|
Lines 22-29
Link Here
|
| 22 |
import java.util.HashMap; |
22 |
import java.util.HashMap; |
| 23 |
import java.util.Iterator; |
23 |
import java.util.Iterator; |
| 24 |
import java.util.Map; |
24 |
import java.util.Map; |
|
|
25 |
import java.util.Set; |
| 26 |
import java.util.TreeSet; |
| 25 |
|
27 |
|
| 26 |
import org.eclipse.core.commands.IHandler2; |
28 |
import org.eclipse.core.commands.IHandler2; |
|
|
29 |
import org.eclipse.core.commands.contexts.ContextManagerEvent; |
| 30 |
import org.eclipse.core.commands.contexts.IContextManagerListener; |
| 27 |
import org.eclipse.core.runtime.IAdaptable; |
31 |
import org.eclipse.core.runtime.IAdaptable; |
| 28 |
import org.eclipse.core.runtime.IProgressMonitor; |
32 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 29 |
import org.eclipse.core.runtime.IStatus; |
33 |
import org.eclipse.core.runtime.IStatus; |
|
Lines 67-72
Link Here
|
| 67 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; |
71 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; |
| 68 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; |
72 |
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; |
| 69 |
import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext; |
73 |
import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext; |
|
|
74 |
import org.eclipse.debug.internal.ui.views.ViewContextService; |
| 70 |
import org.eclipse.debug.ui.AbstractDebugView; |
75 |
import org.eclipse.debug.ui.AbstractDebugView; |
| 71 |
import org.eclipse.debug.ui.DebugUITools; |
76 |
import org.eclipse.debug.ui.DebugUITools; |
| 72 |
import org.eclipse.debug.ui.IDebugModelPresentation; |
77 |
import org.eclipse.debug.ui.IDebugModelPresentation; |
|
Lines 76-81
Link Here
|
| 76 |
import org.eclipse.debug.ui.contexts.DebugContextEvent; |
81 |
import org.eclipse.debug.ui.contexts.DebugContextEvent; |
| 77 |
import org.eclipse.debug.ui.contexts.IDebugContextListener; |
82 |
import org.eclipse.debug.ui.contexts.IDebugContextListener; |
| 78 |
import org.eclipse.debug.ui.contexts.IDebugContextProvider; |
83 |
import org.eclipse.debug.ui.contexts.IDebugContextProvider; |
|
|
84 |
import org.eclipse.jface.action.ActionContributionItem; |
| 79 |
import org.eclipse.jface.action.GroupMarker; |
85 |
import org.eclipse.jface.action.GroupMarker; |
| 80 |
import org.eclipse.jface.action.IMenuListener; |
86 |
import org.eclipse.jface.action.IMenuListener; |
| 81 |
import org.eclipse.jface.action.IMenuManager; |
87 |
import org.eclipse.jface.action.IMenuManager; |
|
Lines 115-120
Link Here
|
| 115 |
import org.eclipse.ui.WorkbenchException; |
121 |
import org.eclipse.ui.WorkbenchException; |
| 116 |
import org.eclipse.ui.XMLMemento; |
122 |
import org.eclipse.ui.XMLMemento; |
| 117 |
import org.eclipse.ui.actions.SelectionListenerAction; |
123 |
import org.eclipse.ui.actions.SelectionListenerAction; |
|
|
124 |
import org.eclipse.ui.contexts.IContextService; |
| 118 |
import org.eclipse.ui.dialogs.PropertyDialogAction; |
125 |
import org.eclipse.ui.dialogs.PropertyDialogAction; |
| 119 |
import org.eclipse.ui.part.IPageBookViewPage; |
126 |
import org.eclipse.ui.part.IPageBookViewPage; |
| 120 |
import org.eclipse.ui.part.IPageSite; |
127 |
import org.eclipse.ui.part.IPageSite; |
|
Lines 126-132
Link Here
|
| 126 |
import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
133 |
import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
| 127 |
import org.eclipse.ui.progress.UIJob; |
134 |
import org.eclipse.ui.progress.UIJob; |
| 128 |
|
135 |
|
| 129 |
public class LaunchView extends AbstractDebugView implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, IShowInTargetList, IPartListener2, IViewerUpdateListener { |
136 |
public class LaunchView extends AbstractDebugView |
|
|
137 |
implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, |
| 138 |
IShowInTargetList, IPartListener2, IViewerUpdateListener, IContextManagerListener |
| 139 |
{ |
| 130 |
|
140 |
|
| 131 |
public static final String ID_CONTEXT_ACTIVITY_BINDINGS = "contextActivityBindings"; //$NON-NLS-1$ |
141 |
public static final String ID_CONTEXT_ACTIVITY_BINDINGS = "contextActivityBindings"; //$NON-NLS-1$ |
| 132 |
|
142 |
|
|
Lines 194-199
Link Here
|
| 194 |
private DebugViewModeAction[] fDebugViewModeActions; |
204 |
private DebugViewModeAction[] fDebugViewModeActions; |
| 195 |
|
205 |
|
| 196 |
/** |
206 |
/** |
|
|
207 |
*/ |
| 208 |
private DebugToolBarAction[] fDebugToolBarActions; |
| 209 |
|
| 210 |
/** |
| 197 |
* Action that controls the breadcrumb drop-down auto-expand behavior. |
211 |
* Action that controls the breadcrumb drop-down auto-expand behavior. |
| 198 |
* |
212 |
* |
| 199 |
* @since 3.5 |
213 |
* @since 3.5 |
|
Lines 201-206
Link Here
|
| 201 |
private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction; |
215 |
private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction; |
| 202 |
|
216 |
|
| 203 |
/** |
217 |
/** |
|
|
218 |
* Context service for this view. Used to track whether debug toolbar |
| 219 |
* action set is active. |
| 220 |
* |
| 221 |
* @since 3.8 |
| 222 |
*/ |
| 223 |
private IContextService fContextService; |
| 224 |
|
| 225 |
/** |
| 204 |
* Preference name for the view's memento. |
226 |
* Preference name for the view's memento. |
| 205 |
* |
227 |
* |
| 206 |
* @since 3.5 |
228 |
* @since 3.5 |
|
Lines 214-220
Link Here
|
| 214 |
* @since 3.5 |
236 |
* @since 3.5 |
| 215 |
*/ |
237 |
*/ |
| 216 |
private static final String BREADCRUMB_DROPDOWN_AUTO_EXPAND = DebugUIPlugin.getUniqueIdentifier() + ".BREADCRUMB_DROPDOWN_AUTO_EXPAND"; //$NON-NLS-1$ |
238 |
private static final String BREADCRUMB_DROPDOWN_AUTO_EXPAND = DebugUIPlugin.getUniqueIdentifier() + ".BREADCRUMB_DROPDOWN_AUTO_EXPAND"; //$NON-NLS-1$ |
| 217 |
|
239 |
|
| 218 |
/** |
240 |
/** |
| 219 |
* Preference for whether the elements in breadcrumb's |
241 |
* Preference for whether the elements in breadcrumb's |
| 220 |
* drop-down viewer should be automatically expanded. |
242 |
* drop-down viewer should be automatically expanded. |
|
Lines 230-235
Link Here
|
| 230 |
*/ |
252 |
*/ |
| 231 |
private Map fHandlers = new HashMap(); |
253 |
private Map fHandlers = new HashMap(); |
| 232 |
|
254 |
|
|
|
255 |
private boolean fDebugToolbarInView = true; |
| 256 |
|
| 257 |
private Set fDebugToolbarHiddenPerspectives = new TreeSet(); |
| 258 |
|
| 233 |
/** |
259 |
/** |
| 234 |
* Page-book page for the breadcrumb viewer. This page is activated in |
260 |
* Page-book page for the breadcrumb viewer. This page is activated in |
| 235 |
* Debug view when the height of the view is reduced to just one line. |
261 |
* Debug view when the height of the view is reduced to just one line. |
|
Lines 604-609
Link Here
|
| 604 |
fDebugViewModeActions[i].setChecked(fDebugViewModeActions[i].getMode().equals(mode)); |
630 |
fDebugViewModeActions[i].setChecked(fDebugViewModeActions[i].getMode().equals(mode)); |
| 605 |
} |
631 |
} |
| 606 |
|
632 |
|
|
|
633 |
createDebugToolBarInViewActions(parent); |
| 634 |
|
| 607 |
// Add a resize listener for the view to activate breadcrumb as needed. |
635 |
// Add a resize listener for the view to activate breadcrumb as needed. |
| 608 |
parent.addControlListener(new ControlListener() { |
636 |
parent.addControlListener(new ControlListener() { |
| 609 |
public void controlMoved(ControlEvent e) { |
637 |
public void controlMoved(ControlEvent e) { |
|
Lines 617-622
Link Here
|
| 617 |
} |
645 |
} |
| 618 |
} |
646 |
} |
| 619 |
}); |
647 |
}); |
|
|
648 |
|
| 649 |
fContextService.addContextManagerListener(this); |
| 620 |
} |
650 |
} |
| 621 |
|
651 |
|
| 622 |
/** |
652 |
/** |
|
Lines 705-711
Link Here
|
| 705 |
modeSubmenu.add(new Separator()); |
735 |
modeSubmenu.add(new Separator()); |
| 706 |
modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); |
736 |
modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); |
| 707 |
viewMenu.add(modeSubmenu); |
737 |
viewMenu.add(modeSubmenu); |
| 708 |
viewMenu.add(new Separator()); |
|
|
| 709 |
|
738 |
|
| 710 |
modeSubmenu.addMenuListener(new IMenuListener() { |
739 |
modeSubmenu.addMenuListener(new IMenuListener() { |
| 711 |
public void menuAboutToShow(IMenuManager manager) { |
740 |
public void menuAboutToShow(IMenuManager manager) { |
|
Lines 716-725
Link Here
|
| 716 |
modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); |
745 |
modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); |
| 717 |
} |
746 |
} |
| 718 |
}); |
747 |
}); |
|
|
748 |
} |
| 749 |
|
| 750 |
/** |
| 751 |
* Creates actions for controlling view mode. |
| 752 |
* |
| 753 |
* @param parent The view's parent control used to calculate view size |
| 754 |
* in auto mode. |
| 755 |
*/ |
| 756 |
private void createDebugToolBarInViewActions(final Composite parent) { |
| 757 |
IActionBars actionBars = getViewSite().getActionBars(); |
| 758 |
IMenuManager viewMenu = actionBars.getMenuManager(); |
| 759 |
|
| 760 |
fDebugToolBarActions = new DebugToolBarAction[3]; |
| 761 |
fDebugToolBarActions[0] = new DebugToolBarAction(this, true, false); |
| 762 |
fDebugToolBarActions[1] = new DebugToolBarAction(this, false, true); |
| 763 |
fDebugToolBarActions[2] = new DebugToolBarAction(this, true, true); |
| 764 |
|
| 765 |
final MenuManager modeSubmenu = new MenuManager(LaunchViewMessages.LaunchView_ToolBarMenu_label); |
| 766 |
modeSubmenu.setRemoveAllWhenShown(true); |
| 767 |
modeSubmenu.add(fDebugToolBarActions[0]); |
| 768 |
modeSubmenu.add(fDebugToolBarActions[1]); |
| 769 |
modeSubmenu.add(fDebugToolBarActions[2]); |
| 770 |
viewMenu.add(modeSubmenu); |
| 771 |
|
| 772 |
modeSubmenu.addMenuListener(new IMenuListener() { |
| 773 |
public void menuAboutToShow(IMenuManager manager) { |
| 774 |
modeSubmenu.add(fDebugToolBarActions[0]); |
| 775 |
modeSubmenu.add(fDebugToolBarActions[1]); |
| 776 |
modeSubmenu.add(fDebugToolBarActions[2]); |
| 777 |
} |
| 778 |
}); |
| 719 |
|
779 |
|
|
|
780 |
updateCheckedDebugToolBarAction(); |
| 720 |
} |
781 |
} |
| 721 |
|
782 |
|
| 722 |
|
783 |
|
| 723 |
/** |
784 |
/** |
| 724 |
* Sets the current view mode. If needed, the active view page is changed. |
785 |
* Sets the current view mode. If needed, the active view page is changed. |
| 725 |
* |
786 |
* |
|
Lines 858-863
Link Here
|
| 858 |
setBreadcrumbDropDownAutoExpand(auto.booleanValue()); |
919 |
setBreadcrumbDropDownAutoExpand(auto.booleanValue()); |
| 859 |
} |
920 |
} |
| 860 |
} |
921 |
} |
|
|
922 |
|
| 923 |
String preference = DebugUIPlugin.getDefault().getPreferenceStore().getString( |
| 924 |
IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES); |
| 925 |
if (preference != null) { |
| 926 |
fDebugToolbarHiddenPerspectives = ViewContextService.parseList(preference); |
| 927 |
} |
| 928 |
IPerspectiveDescriptor perspective = getSite().getPage().getPerspective(); |
| 929 |
fDebugToolbarInView = perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId()); |
| 861 |
} |
930 |
} |
| 862 |
|
931 |
|
| 863 |
/* (non-Javadoc) |
932 |
/* (non-Javadoc) |
|
Lines 867-872
Link Here
|
| 867 |
super.init(site); |
936 |
super.init(site); |
| 868 |
commonInit(site); |
937 |
commonInit(site); |
| 869 |
preferenceInit(site); |
938 |
preferenceInit(site); |
|
|
939 |
fContextService = (IContextService)site.getService(IContextService.class); |
| 870 |
} |
940 |
} |
| 871 |
|
941 |
|
| 872 |
/* (non-Javadoc) |
942 |
/* (non-Javadoc) |
|
Lines 876-881
Link Here
|
| 876 |
super.init(site, memento); |
946 |
super.init(site, memento); |
| 877 |
commonInit(site); |
947 |
commonInit(site); |
| 878 |
preferenceInit(site); |
948 |
preferenceInit(site); |
|
|
949 |
fContextService = (IContextService)site.getService(IContextService.class); |
| 879 |
} |
950 |
} |
| 880 |
|
951 |
|
| 881 |
/* (non-Javadoc) |
952 |
/* (non-Javadoc) |
|
Lines 904-909
Link Here
|
| 904 |
} |
975 |
} |
| 905 |
} |
976 |
} |
| 906 |
} |
977 |
} |
|
|
978 |
|
| 979 |
StringBuffer buffer= new StringBuffer(); |
| 980 |
for (Iterator itr = fDebugToolbarHiddenPerspectives.iterator(); itr.hasNext();) { |
| 981 |
buffer.append(itr.next()).append(','); |
| 982 |
} |
| 983 |
getPreferenceStore().setValue(IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES, buffer.toString()); |
| 984 |
|
| 907 |
super.partDeactivated(part); |
985 |
super.partDeactivated(part); |
| 908 |
} |
986 |
} |
| 909 |
|
987 |
|
|
Lines 926-932
Link Here
|
| 926 |
tbm.add(new GroupMarker(IDebugUIConstants.STEP_RETURN_GROUP)); |
1004 |
tbm.add(new GroupMarker(IDebugUIConstants.STEP_RETURN_GROUP)); |
| 927 |
tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP)); |
1005 |
tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP)); |
| 928 |
tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP)); |
1006 |
tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP)); |
| 929 |
|
1007 |
|
|
|
1008 |
if (fDebugToolbarInView) { |
| 1009 |
addDebugToolbarActions(tbm); |
| 1010 |
} |
| 1011 |
} |
| 1012 |
|
| 1013 |
protected void addDebugToolbarActions(IToolBarManager tbm) { |
| 930 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESUME)); |
1014 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESUME)); |
| 931 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND)); |
1015 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND)); |
| 932 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE)); |
1016 |
tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE)); |
|
Lines 935-950
Link Here
|
| 935 |
tbm.appendToGroup(IDebugUIConstants.STEP_INTO_GROUP, getAction(STEP_INTO)); |
1019 |
tbm.appendToGroup(IDebugUIConstants.STEP_INTO_GROUP, getAction(STEP_INTO)); |
| 936 |
tbm.appendToGroup(IDebugUIConstants.STEP_OVER_GROUP, getAction(STEP_OVER)); |
1020 |
tbm.appendToGroup(IDebugUIConstants.STEP_OVER_GROUP, getAction(STEP_OVER)); |
| 937 |
tbm.appendToGroup(IDebugUIConstants.STEP_RETURN_GROUP, getAction(STEP_RETURN)); |
1021 |
tbm.appendToGroup(IDebugUIConstants.STEP_RETURN_GROUP, getAction(STEP_RETURN)); |
| 938 |
|
1022 |
|
| 939 |
tbm.appendToGroup(IDebugUIConstants.EMPTY_STEP_GROUP, getAction(DROP_TO_FRAME)); |
1023 |
tbm.appendToGroup(IDebugUIConstants.EMPTY_STEP_GROUP, getAction(DROP_TO_FRAME)); |
| 940 |
|
1024 |
|
| 941 |
tbm.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); |
1025 |
tbm.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); |
| 942 |
} |
1026 |
} |
| 943 |
|
1027 |
|
|
|
1028 |
/** |
| 1029 |
* Removes the toolbar actions contributed by this view from the toolbar |
| 1030 |
* manager. |
| 1031 |
* @param tbm |
| 1032 |
*/ |
| 1033 |
protected void removeDebugToolbarActions(IToolBarManager tbm) { |
| 1034 |
tbm.remove(new ActionContributionItem(getAction(RESUME))); |
| 1035 |
tbm.remove(new ActionContributionItem(getAction(SUSPEND))); |
| 1036 |
tbm.remove(new ActionContributionItem(getAction(TERMINATE))); |
| 1037 |
tbm.remove(new ActionContributionItem(getAction(DISCONNECT))); |
| 1038 |
|
| 1039 |
tbm.remove(new ActionContributionItem(getAction(STEP_INTO))); |
| 1040 |
tbm.remove(new ActionContributionItem(getAction(STEP_OVER))); |
| 1041 |
tbm.remove(new ActionContributionItem(getAction(STEP_RETURN))); |
| 1042 |
|
| 1043 |
tbm.remove(new ActionContributionItem(getAction(DROP_TO_FRAME))); |
| 1044 |
|
| 1045 |
tbm.remove(new ActionContributionItem(getAction(TOGGLE_STEP_FILTERS))); |
| 1046 |
} |
| 1047 |
|
| 1048 |
public boolean isDebugToolbarInView() { |
| 1049 |
return fDebugToolbarInView; |
| 1050 |
} |
| 1051 |
|
| 1052 |
public boolean isDebugToolbarInViewInPerspective(IPerspectiveDescriptor perspective) { |
| 1053 |
return perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId()); |
| 1054 |
} |
| 1055 |
|
| 1056 |
public void setDebugToolbarInView(boolean show) { |
| 1057 |
if (show == isDebugToolbarInView()) { |
| 1058 |
return; |
| 1059 |
} |
| 1060 |
fDebugToolbarInView = show; |
| 1061 |
|
| 1062 |
// Update the perspectives set. |
| 1063 |
IPerspectiveDescriptor perspective = getSite().getPage().getPerspective(); |
| 1064 |
if (perspective != null) { |
| 1065 |
if (show) { |
| 1066 |
fDebugToolbarHiddenPerspectives.remove(perspective.getId()); |
| 1067 |
} else { |
| 1068 |
fDebugToolbarHiddenPerspectives.add(perspective.getId()); |
| 1069 |
} |
| 1070 |
} |
| 1071 |
|
| 1072 |
// Update the toolbar manager. |
| 1073 |
IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager(); |
| 1074 |
if (show) { |
| 1075 |
addDebugToolbarActions(tbm); |
| 1076 |
} else { |
| 1077 |
removeDebugToolbarActions(tbm); |
| 1078 |
} |
| 1079 |
getViewSite().getActionBars().updateActionBars(); |
| 1080 |
|
| 1081 |
// Update system property used by contributed actions. |
| 1082 |
System.setProperty(IDebugUIConstants.DEBUG_VIEW_TOOBAR_VISIBLE, Boolean.toString(show)); |
| 1083 |
} |
| 1084 |
|
| 1085 |
|
| 944 |
/* (non-Javadoc) |
1086 |
/* (non-Javadoc) |
| 945 |
* @see org.eclipse.ui.IWorkbenchPart#dispose() |
1087 |
* @see org.eclipse.ui.IWorkbenchPart#dispose() |
| 946 |
*/ |
1088 |
*/ |
| 947 |
public void dispose() { |
1089 |
public void dispose() { |
|
|
1090 |
fContextService.removeContextManagerListener(this); |
| 948 |
getSite().getSelectionProvider().removeSelectionChangedListener(this); |
1091 |
getSite().getSelectionProvider().removeSelectionChangedListener(this); |
| 949 |
DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextProvider(fContextProviderProxy); |
1092 |
DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextProvider(fContextProviderProxy); |
| 950 |
fContextProviderProxy.dispose(); |
1093 |
fContextProviderProxy.dispose(); |
|
Lines 1024-1029
Link Here
|
| 1024 |
public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { |
1167 |
public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { |
| 1025 |
setActive(page.findView(getSite().getId()) != null); |
1168 |
setActive(page.findView(getSite().getId()) != null); |
| 1026 |
updateObjects(); |
1169 |
updateObjects(); |
|
|
1170 |
setDebugToolbarInView( isDebugToolbarInViewInPerspective(getSite().getPage().getPerspective()) ); |
| 1171 |
updateCheckedDebugToolBarAction(); |
| 1027 |
} |
1172 |
} |
| 1028 |
|
1173 |
|
| 1029 |
/* (non-Javadoc) |
1174 |
/* (non-Javadoc) |
|
Lines 1125-1130
Link Here
|
| 1125 |
menu.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); |
1270 |
menu.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); |
| 1126 |
} |
1271 |
} |
| 1127 |
|
1272 |
|
|
|
1273 |
public void contextManagerChanged(ContextManagerEvent event) { |
| 1274 |
if (event.isActiveContextsChanged()) { |
| 1275 |
Set oldContexts = event.getPreviouslyActiveContextIds(); |
| 1276 |
Set newContexts = event.getContextManager().getActiveContextIds(); |
| 1277 |
if (oldContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET) != |
| 1278 |
newContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET)) |
| 1279 |
{ |
| 1280 |
updateCheckedDebugToolBarAction(); |
| 1281 |
} |
| 1282 |
} |
| 1283 |
} |
| 1284 |
|
| 1285 |
private void updateCheckedDebugToolBarAction() { |
| 1286 |
boolean debugToolBarInView = isDebugToolbarInView(); |
| 1287 |
boolean toolbarActionSetActive = fContextService.getActiveContextIds().contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET); |
| 1288 |
for (int i = 0; i < fDebugToolBarActions.length; i++) { |
| 1289 |
fDebugToolBarActions[i].setChecked( |
| 1290 |
fDebugToolBarActions[i].getDebugViewToolbar() == debugToolBarInView && |
| 1291 |
fDebugToolBarActions[i].getDebugToolbarActionSet() == toolbarActionSetActive); |
| 1292 |
} |
| 1293 |
} |
| 1294 |
|
| 1128 |
/** |
1295 |
/** |
| 1129 |
* Updates the enabled state of the given action based on the selection |
1296 |
* Updates the enabled state of the given action based on the selection |
| 1130 |
* and adds to the menu if enabled. |
1297 |
* and adds to the menu if enabled. |