Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 203431 Details for
Bug 258767
[debug view][menu] support for top level debug toolbar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated fix with a menu in Debug view to select toolbar.
20110915_258767.patch (text/plain), 40.41 KB, created by
Pawel Piech
on 2011-09-15 14:10:59 EDT
(
hide
)
Description:
Updated fix with a menu in Debug view to select toolbar.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2011-09-15 14:10:59 EDT
Size:
40.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.59 >diff -u -r1.59 MANIFEST.MF >--- META-INF/MANIFEST.MF 7 Jul 2011 04:49:12 -0000 1.59 >+++ META-INF/MANIFEST.MF 15 Sep 2011 18:09:19 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true >-Bundle-Version: 3.7.200.qualifier >+Bundle-Version: 3.8.0.qualifier > Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin > Bundle-Vendor: %providerName > Bundle-Localization: plugin >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/plugin.properties,v >retrieving revision 1.254 >diff -u -r1.254 plugin.properties >--- plugin.properties 18 May 2010 19:38:02 -0000 1.254 >+++ plugin.properties 15 Sep 2011 18:09:19 -0000 >@@ -10,6 +10,7 @@ > # QNX Software Systems - Mikhail Khodjaiants - Registers View (Bug 53640) > # Wind River Systems - Pawel Piech - Added Modules view (bug 211158) > # Wind River Systems - Ted Williams -[Memory View] Memory View: Workflow Enhancements (bug 215432) >+# Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784) > ############################################################################### > > pluginName=Debug UI >@@ -51,6 +52,7 @@ > CopyExpressionsToClipboardAction.label=Copy &Expressions > CopyRegistersToClipboardAction.label=Copy &Registers > DebugActionSet.label=Debug >+DebugToolbarActionSet.label=Debug Toolbar > debugCurrentInstructionPointer=Debug Current Instruction Pointer > debugCallStack=Debug Call Stack > DebugDropDownAction.label=Debug >@@ -129,6 +131,8 @@ > StringVariablePresentationsName=String Variable Presentations > SuspendAction.label=&Suspend > TerminateAction.label=&Terminate >+DropToFrame.label=Drop To Frame >+Disconnect.label=Disconnect > ToggleBreakpointAction.label=Toggle Brea&kpoint > ToggleBreakpointsTargetFactoriesExtension.name=Toggle Breakpoints Target Factories > ToggleLineBreakpointAction.label=Toggle &Line Breakpoint >@@ -219,6 +223,12 @@ > ActionDefinition.suspend.name=Suspend > ActionDefinition.suspend.description=Suspend > >+ActionDefinition.dropToFrame.name=Drop to Frame >+ActionDefinition.dropToFrame.description=Drop to Frame >+ >+ActionDefinition.disconnect.name=Disconnect >+ActionDefinition.disconnect.description=Disconnect >+ > ActionDefinition.openProfile.name=Profile... > ActionDefinition.openProfile.description=Open profile launch configuration dialog > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/plugin.xml,v >retrieving revision 1.456 >diff -u -r1.456 plugin.xml >--- plugin.xml 9 May 2011 09:36:20 -0000 1.456 >+++ plugin.xml 15 Sep 2011 18:09:19 -0000 >@@ -10,6 +10,7 @@ > Contributors: > IBM Corporation - initial API and implementation > Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956) >+ Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784) > --> > > <plugin> >@@ -382,6 +383,122 @@ > </action> > </actionSet> > <actionSet >+ label="%DebugToolbarActionSet.label" >+ visible="false" >+ id="org.eclipse.debug.ui.debugToolbarActionSet"> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.ToggleStepFilters" >+ hoverIcon="$nl$/icons/full/elcl16/stepbystep_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.ToggleStepFiltersCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.ToggleStepFilters" >+ disabledIcon="$nl$/icons/full/dlcl16/stepbystep_co.gif" >+ icon="$nl$/icons/full/elcl16/stepbystep_co.gif" >+ helpContextId="step_with_filters_action_context" >+ label="%StepWithFiltersAction.label" >+ style="toggle" >+ state="false" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/renderGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.DropToFrame" >+ hoverIcon="$nl$/icons/full/elcl16/drop_to_frame.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.DropToFrame" >+ disabledIcon="$nl$/icons/full/dlcl16/drop_to_frame.gif" >+ helpContextId="drop_to_frame_action_context" >+ icon="$nl$/icons/full/elcl16/drop_to_frame.gif" >+ label="%DropToFrame.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/emptyStepGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.RunToLine" >+ class="org.eclipse.debug.internal.ui.actions.RetargetRunToLineAction" >+ definitionId="org.eclipse.debug.ui.commands.RunToLine" >+ helpContextId="run_to_line_action_context" >+ disabledIcon="$nl$/icons/full/dlcl16/runtoline_co.gif" >+ icon="$nl$/icons/full/elcl16/runtoline_co.gif" >+ label="%RunToLine.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/emptyStepGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.StepReturn" >+ hoverIcon="$nl$/icons/full/elcl16/stepreturn_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.StepReturnCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepReturn" >+ disabledIcon="$nl$/icons/full/dlcl16/stepreturn_co.gif" >+ icon="$nl$/icons/full/elcl16/stepreturn_co.gif" >+ helpContextId="step_return_action_context" >+ label="%StepReturnAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/stepReturnGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.StepOver" >+ hoverIcon="$nl$/icons/full/elcl16/stepover_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepOver" >+ disabledIcon="$nl$/icons/full/dlcl16/stepover_co.gif" >+ icon="$nl$/icons/full/elcl16/stepover_co.gif" >+ helpContextId="step_over_action_context" >+ label="%StepOverAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/stepOverGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.StepInto" >+ hoverIcon="$nl$/icons/full/elcl16/stepinto_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepInto" >+ disabledIcon="$nl$/icons/full/dlcl16/stepinto_co.gif" >+ icon="$nl$/icons/full/elcl16/stepinto_co.gif" >+ helpContextId="step_into_action_context" >+ label="%StepIntoAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/stepIntoGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.Disconnect" >+ hoverIcon="$nl$/icons/full/elcl16/disconnect_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Disconnect" >+ disabledIcon="$nl$/icons/full/dlcl16/disconnect_co.gif" >+ icon="$nl$/icons/full/elcl16/disconnect_co.gif" >+ helpContextId="disconnect_action_context" >+ label="%Disconnect.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.Terminate" >+ hoverIcon="$nl$/icons/full/elcl16/terminate_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.TerminateCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Terminate" >+ disabledIcon="$nl$/icons/full/dlcl16/terminate_co.gif" >+ icon="$nl$/icons/full/elcl16/terminate_co.gif" >+ helpContextId="terminate_action_context" >+ label="%TerminateAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.Suspend" >+ hoverIcon="$nl$/icons/full/elcl16/suspend_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Suspend" >+ disabledIcon="$nl$/icons/full/dlcl16/suspend_co.gif" >+ icon="$nl$/icons/full/elcl16/suspend_co.gif" >+ helpContextId="suspend_action_context" >+ label="%SuspendAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.toolbar.Resume" >+ hoverIcon="$nl$/icons/full/elcl16/resume_co.gif" >+ class="org.eclipse.debug.internal.ui.commands.actions.ResumeCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Resume" >+ disabledIcon="$nl$/icons/full/dlcl16/resume_co.gif" >+ icon="$nl$/icons/full/elcl16/resume_co.gif" >+ helpContextId="resume_action_context" >+ label="%ResumeAction.label" >+ toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup"> >+ </action> >+ </actionSet> >+ <actionSet > label="%LaunchActionSet.label" > visible="false" > id="org.eclipse.debug.ui.launchActionSet"> >@@ -613,6 +730,41 @@ > </dynamic> > </menu> > </menuContribution> >+ <menuContribution >+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions"> >+ <toolbar >+ id="org.eclipse.debug.ui.main.toolbar" >+ label="%DebugActionSet.label"> >+ <separator >+ name="threadGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="stepGroup" >+ visible="true"> >+ </separator> >+ <separator >+ name="stepIntoGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="stepOverGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="stepReturnGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="emptyStepGroup" >+ visible="false"> >+ </separator> >+ <separator >+ name="renderGroup" >+ visible="true"> >+ </separator> >+ </toolbar> >+ </menuContribution> > </extension> > > <extension >@@ -1625,6 +1777,18 @@ > id="org.eclipse.debug.ui.commands.ToggleStepFilters"> > </command> > <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%ActionDefinition.dropToFrame.description" >+ id="org.eclipse.debug.ui.commands.DropToFrame" >+ name="%ActionDefinition.dropToFrame.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%ActionDefinition.disconnect.discrption" >+ id="org.eclipse.debug.ui.commands.Disconnect" >+ name="%ActionDefinition.disconnect.name"> >+ </command> >+ <command > name="%ActionDefinition.stepInto.name" > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.stepInto.description" >Index: ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java,v >retrieving revision 1.82 >diff -u -r1.82 IDebugHelpContextIds.java >--- ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java 6 May 2009 19:14:48 -0000 1.82 >+++ ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java 15 Sep 2011 18:09:19 -0000 >@@ -75,6 +75,9 @@ > public static final String DEBUG_VIEW_MODE_FULL_ACTION = PREFIX + "debug_view_mode_full_action_context"; //$NON-NLS-1$ > public static final String DEBUG_VIEW_MODE_COMPACT_ACTION = PREFIX + "debug_view_mode_compact_action_context"; //$NON-NLS-1$ > public static final String DEBUG_VIEW_DROP_DOWN_AUTOEXPAND_ACTION = PREFIX + "debug_view_drop_down_autoexpand_action_context"; //$NON-NLS-1$ >+ public static final String DEBUG_TOOLBAR_VIEW_ACTION = PREFIX + "debug_toolbar_view_action_context"; //$NON-NLS-1$ >+ public static final String DEBUG_TOOLBAR_WINDOW_ACTION = PREFIX + "debug_toolbar_window_action_context"; //$NON-NLS-1$ >+ public static final String DEBUG_TOOLBAR_BOTH_ACTION = PREFIX + "debug_toolbar_both_action_context"; //$NON-NLS-1$ > > // Views > public static final String DEBUG_VIEW = PREFIX + "debug_view_context"; //$NON-NLS-1$ >Index: ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java >=================================================================== >RCS file: ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java >diff -N ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/***************************************************************** >+ * Copyright (c) 2010 Texas Instruments and others >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784) >+ *****************************************************************/ >+package org.eclipse.debug.internal.ui.commands.actions; >+ >+/** >+ * Disconnect action delegate. >+ * >+ * @since 3.7 >+ */ >+public class DisconnectCommandActionDelegate extends DebugCommandActionDelegate { >+ >+ public DisconnectCommandActionDelegate() { >+ super(); >+ setAction(new DisconnectCommandAction()); >+ } >+} >Index: ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java >=================================================================== >RCS file: ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java >diff -N ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/***************************************************************** >+ * Copyright (c) 2010 Texas Instruments and others >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784) >+ *****************************************************************/ >+package org.eclipse.debug.internal.ui.commands.actions; >+ >+/** >+ * Drop to Frame action delegate. >+ * >+ * @since 3.7 >+ */ >+public class DropToFrameCommandActionDelegate extends DebugCommandActionDelegate { >+ >+ public DropToFrameCommandActionDelegate() { >+ super(); >+ setAction(new DropToFrameCommandAction()); >+ } >+} >Index: ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java,v >retrieving revision 1.59 >diff -u -r1.59 IDebugPreferenceConstants.java >--- ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java 19 Mar 2010 20:18:32 -0000 1.59 >+++ ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java 15 Sep 2011 18:09:20 -0000 >@@ -295,6 +295,13 @@ > * @since 3.5 > */ > public static final String DEBUG_VIEW_BREADCRUMB_AUTO_EXPAND_DROP_DOWN = "org.eclispe.debug.ui.Debug_view.Breadcrumb.dropDownAutoexpand"; //$NON-NLS-1$ >+ >+ /** >+ * Perspectives in which the debug toolbar is hidden. >+ * >+ * @since 3.8 >+ */ >+ public static final String DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES = "org.eclispe.debug.ui.Debug_view.debug_toolbar_hidden_perspectives"; //$NON-NLS-1$ > } > > >Index: ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java >=================================================================== >RCS file: ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java >diff -N ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,92 @@ >+/******************************************************************************* >+ * Copyright (c) 2000, 2011 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.debug.internal.ui.views.launch; >+ >+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants; >+import org.eclipse.debug.internal.ui.IDebugHelpContextIds; >+import org.eclipse.debug.ui.IDebugUIConstants; >+import org.eclipse.jface.action.Action; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.PlatformUI; >+ >+/** >+ * Action that controls whether Debug actions are shown in Launch view. >+ * >+ * @since 3.8 >+ */ >+class DebugToolBarAction extends Action { >+ >+ private final LaunchView fLaunchView; >+ private final boolean fDebugViewToolbar; >+ private final boolean fDebugToolbarActionSet; >+ >+ /** >+ * Creates a new action to set the debug view mode. >+ * >+ * @param view Reference to the debug view. >+ * @param debugViewToolbar Causes action to show toolbar in Debug view. >+ * @param debugActionSet Causes action to show toolbar in top level Window >+ * toolbar.. >+ */ >+ public DebugToolBarAction(LaunchView view, boolean debugViewToolbar, boolean debugActionSet) { >+ super(IInternalDebugCoreConstants.EMPTY_STRING, AS_RADIO_BUTTON); >+ fLaunchView = view; >+ fDebugViewToolbar = debugViewToolbar; >+ fDebugToolbarActionSet = debugActionSet; >+ >+ if (fDebugViewToolbar && fDebugToolbarActionSet) { >+ setText(LaunchViewMessages.DebugToolBarAction_Both_label); >+ setToolTipText(LaunchViewMessages.DebugToolBarAction_Both_tooltip); >+ setDescription(LaunchViewMessages.DebugToolBarAction_Both_description); >+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_BOTH_ACTION); >+ } else if (fDebugViewToolbar) { >+ setText(LaunchViewMessages.DebugToolBarAction_View_label); >+ setToolTipText(LaunchViewMessages.DebugToolBarAction_View_tooltip); >+ setDescription(LaunchViewMessages.DebugToolBarAction_View_description); >+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_VIEW_ACTION); >+ } else if (fDebugToolbarActionSet) { >+ setText(LaunchViewMessages.DebugToolBarAction_Window_label); >+ setToolTipText(LaunchViewMessages.DebugToolBarAction_Window_tooltip); >+ setDescription(LaunchViewMessages.DebugToolBarAction_Window_description); >+ PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_WINDOW_ACTION); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.jface.action.IAction#run() >+ */ >+ public void run() { >+ fLaunchView.setDebugToolbarInView(fDebugViewToolbar); >+ >+ IWorkbenchPage page = fLaunchView.getSite().getPage(); >+ >+ if (fDebugToolbarActionSet) { >+ page.showActionSet(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET); >+ } else { >+ page.hideActionSet(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET); >+ } >+ } >+ >+ /** >+ * @return Returns whether debug toolbar is shown in view by this action. >+ */ >+ public boolean getDebugViewToolbar() { >+ return fDebugViewToolbar; >+ } >+ >+ /** >+ * @return Returns whether debug toolbar action set is shown by this action. >+ */ >+ public boolean getDebugToolbarActionSet() { >+ return fDebugToolbarActionSet; >+ } >+} >+ >Index: ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java,v >retrieving revision 1.206 >diff -u -r1.206 LaunchView.java >--- ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java 25 Jul 2011 20:25:28 -0000 1.206 >+++ ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java 15 Sep 2011 18:09:21 -0000 >@@ -22,8 +22,12 @@ > import java.util.HashMap; > import java.util.Iterator; > import java.util.Map; >+import java.util.Set; >+import java.util.TreeSet; > > import org.eclipse.core.commands.IHandler2; >+import org.eclipse.core.commands.contexts.ContextManagerEvent; >+import org.eclipse.core.commands.contexts.IContextManagerListener; > import org.eclipse.core.runtime.IAdaptable; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; >@@ -67,6 +71,7 @@ > import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdateListener; > import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer; > import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext; >+import org.eclipse.debug.internal.ui.views.ViewContextService; > import org.eclipse.debug.ui.AbstractDebugView; > import org.eclipse.debug.ui.DebugUITools; > import org.eclipse.debug.ui.IDebugModelPresentation; >@@ -76,6 +81,7 @@ > import org.eclipse.debug.ui.contexts.DebugContextEvent; > import org.eclipse.debug.ui.contexts.IDebugContextListener; > import org.eclipse.debug.ui.contexts.IDebugContextProvider; >+import org.eclipse.jface.action.ActionContributionItem; > import org.eclipse.jface.action.GroupMarker; > import org.eclipse.jface.action.IMenuListener; > import org.eclipse.jface.action.IMenuManager; >@@ -115,6 +121,7 @@ > import org.eclipse.ui.WorkbenchException; > import org.eclipse.ui.XMLMemento; > import org.eclipse.ui.actions.SelectionListenerAction; >+import org.eclipse.ui.contexts.IContextService; > import org.eclipse.ui.dialogs.PropertyDialogAction; > import org.eclipse.ui.part.IPageBookViewPage; > import org.eclipse.ui.part.IPageSite; >@@ -126,7 +133,10 @@ > import org.eclipse.ui.progress.IWorkbenchSiteProgressService; > import org.eclipse.ui.progress.UIJob; > >-public class LaunchView extends AbstractDebugView implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, IShowInTargetList, IPartListener2, IViewerUpdateListener { >+public class LaunchView extends AbstractDebugView >+ implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, >+ IShowInTargetList, IPartListener2, IViewerUpdateListener, IContextManagerListener >+{ > > public static final String ID_CONTEXT_ACTIVITY_BINDINGS = "contextActivityBindings"; //$NON-NLS-1$ > >@@ -194,6 +204,10 @@ > private DebugViewModeAction[] fDebugViewModeActions; > > /** >+ */ >+ private DebugToolBarAction[] fDebugToolBarActions; >+ >+ /** > * Action that controls the breadcrumb drop-down auto-expand behavior. > * > * @since 3.5 >@@ -201,6 +215,14 @@ > private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction; > > /** >+ * Context service for this view. Used to track whether debug toolbar >+ * action set is active. >+ * >+ * @since 3.8 >+ */ >+ private IContextService fContextService; >+ >+ /** > * Preference name for the view's memento. > * > * @since 3.5 >@@ -214,7 +236,7 @@ > * @since 3.5 > */ > private static final String BREADCRUMB_DROPDOWN_AUTO_EXPAND = DebugUIPlugin.getUniqueIdentifier() + ".BREADCRUMB_DROPDOWN_AUTO_EXPAND"; //$NON-NLS-1$ >- >+ > /** > * Preference for whether the elements in breadcrumb's > * drop-down viewer should be automatically expanded. >@@ -230,6 +252,10 @@ > */ > private Map fHandlers = new HashMap(); > >+ private boolean fDebugToolbarInView = true; >+ >+ private Set fDebugToolbarHiddenPerspectives = new TreeSet(); >+ > /** > * Page-book page for the breadcrumb viewer. This page is activated in > * Debug view when the height of the view is reduced to just one line. >@@ -604,6 +630,8 @@ > fDebugViewModeActions[i].setChecked(fDebugViewModeActions[i].getMode().equals(mode)); > } > >+ createDebugToolBarInViewActions(parent); >+ > // Add a resize listener for the view to activate breadcrumb as needed. > parent.addControlListener(new ControlListener() { > public void controlMoved(ControlEvent e) { >@@ -617,6 +645,8 @@ > } > } > }); >+ >+ fContextService.addContextManagerListener(this); > } > > /** >@@ -705,7 +735,6 @@ > modeSubmenu.add(new Separator()); > modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); > viewMenu.add(modeSubmenu); >- viewMenu.add(new Separator()); > > modeSubmenu.addMenuListener(new IMenuListener() { > public void menuAboutToShow(IMenuManager manager) { >@@ -716,10 +745,42 @@ > modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); > } > }); >+ } >+ >+ /** >+ * Creates actions for controlling view mode. >+ * >+ * @param parent The view's parent control used to calculate view size >+ * in auto mode. >+ */ >+ private void createDebugToolBarInViewActions(final Composite parent) { >+ IActionBars actionBars = getViewSite().getActionBars(); >+ IMenuManager viewMenu = actionBars.getMenuManager(); >+ >+ fDebugToolBarActions = new DebugToolBarAction[3]; >+ fDebugToolBarActions[0] = new DebugToolBarAction(this, true, false); >+ fDebugToolBarActions[1] = new DebugToolBarAction(this, false, true); >+ fDebugToolBarActions[2] = new DebugToolBarAction(this, true, true); >+ >+ final MenuManager modeSubmenu = new MenuManager(LaunchViewMessages.LaunchView_ToolBarMenu_label); >+ modeSubmenu.setRemoveAllWhenShown(true); >+ modeSubmenu.add(fDebugToolBarActions[0]); >+ modeSubmenu.add(fDebugToolBarActions[1]); >+ modeSubmenu.add(fDebugToolBarActions[2]); >+ viewMenu.add(modeSubmenu); >+ >+ modeSubmenu.addMenuListener(new IMenuListener() { >+ public void menuAboutToShow(IMenuManager manager) { >+ modeSubmenu.add(fDebugToolBarActions[0]); >+ modeSubmenu.add(fDebugToolBarActions[1]); >+ modeSubmenu.add(fDebugToolBarActions[2]); >+ } >+ }); > >+ updateCheckedDebugToolBarAction(); > } > >- >+ > /** > * Sets the current view mode. If needed, the active view page is changed. > * >@@ -858,6 +919,14 @@ > setBreadcrumbDropDownAutoExpand(auto.booleanValue()); > } > } >+ >+ String preference = DebugUIPlugin.getDefault().getPreferenceStore().getString( >+ IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES); >+ if (preference != null) { >+ fDebugToolbarHiddenPerspectives = ViewContextService.parseList(preference); >+ } >+ IPerspectiveDescriptor perspective = getSite().getPage().getPerspective(); >+ fDebugToolbarInView = perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId()); > } > > /* (non-Javadoc) >@@ -867,6 +936,7 @@ > super.init(site); > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > > /* (non-Javadoc) >@@ -876,6 +946,7 @@ > super.init(site, memento); > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > > /* (non-Javadoc) >@@ -904,6 +975,13 @@ > } > } > } >+ >+ StringBuffer buffer= new StringBuffer(); >+ for (Iterator itr = fDebugToolbarHiddenPerspectives.iterator(); itr.hasNext();) { >+ buffer.append(itr.next()).append(','); >+ } >+ getPreferenceStore().setValue(IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES, buffer.toString()); >+ > super.partDeactivated(part); > } > >@@ -926,7 +1004,13 @@ > tbm.add(new GroupMarker(IDebugUIConstants.STEP_RETURN_GROUP)); > tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP)); > tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP)); >- >+ >+ if (fDebugToolbarInView) { >+ addDebugToolbarActions(tbm); >+ } >+ } >+ >+ protected void addDebugToolbarActions(IToolBarManager tbm) { > tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESUME)); > tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND)); > tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(TERMINATE)); >@@ -935,16 +1019,75 @@ > tbm.appendToGroup(IDebugUIConstants.STEP_INTO_GROUP, getAction(STEP_INTO)); > tbm.appendToGroup(IDebugUIConstants.STEP_OVER_GROUP, getAction(STEP_OVER)); > tbm.appendToGroup(IDebugUIConstants.STEP_RETURN_GROUP, getAction(STEP_RETURN)); >- >+ > tbm.appendToGroup(IDebugUIConstants.EMPTY_STEP_GROUP, getAction(DROP_TO_FRAME)); > > tbm.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); >- } >- >+ } >+ >+ /** >+ * Removes the toolbar actions contributed by this view from the toolbar >+ * manager. >+ * @param tbm >+ */ >+ protected void removeDebugToolbarActions(IToolBarManager tbm) { >+ tbm.remove(new ActionContributionItem(getAction(RESUME))); >+ tbm.remove(new ActionContributionItem(getAction(SUSPEND))); >+ tbm.remove(new ActionContributionItem(getAction(TERMINATE))); >+ tbm.remove(new ActionContributionItem(getAction(DISCONNECT))); >+ >+ tbm.remove(new ActionContributionItem(getAction(STEP_INTO))); >+ tbm.remove(new ActionContributionItem(getAction(STEP_OVER))); >+ tbm.remove(new ActionContributionItem(getAction(STEP_RETURN))); >+ >+ tbm.remove(new ActionContributionItem(getAction(DROP_TO_FRAME))); >+ >+ tbm.remove(new ActionContributionItem(getAction(TOGGLE_STEP_FILTERS))); >+ } >+ >+ public boolean isDebugToolbarInView() { >+ return fDebugToolbarInView; >+ } >+ >+ public boolean isDebugToolbarInViewInPerspective(IPerspectiveDescriptor perspective) { >+ return perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId()); >+ } >+ >+ public void setDebugToolbarInView(boolean show) { >+ if (show == isDebugToolbarInView()) { >+ return; >+ } >+ fDebugToolbarInView = show; >+ >+ // Update the perspectives set. >+ IPerspectiveDescriptor perspective = getSite().getPage().getPerspective(); >+ if (perspective != null) { >+ if (show) { >+ fDebugToolbarHiddenPerspectives.remove(perspective.getId()); >+ } else { >+ fDebugToolbarHiddenPerspectives.add(perspective.getId()); >+ } >+ } >+ >+ // Update the toolbar manager. >+ IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager(); >+ if (show) { >+ addDebugToolbarActions(tbm); >+ } else { >+ removeDebugToolbarActions(tbm); >+ } >+ getViewSite().getActionBars().updateActionBars(); >+ >+ // Update system property used by contributed actions. >+ System.setProperty(IDebugUIConstants.DEBUG_VIEW_TOOBAR_VISIBLE, Boolean.toString(show)); >+ } >+ >+ > /* (non-Javadoc) > * @see org.eclipse.ui.IWorkbenchPart#dispose() > */ > public void dispose() { >+ fContextService.removeContextManagerListener(this); > getSite().getSelectionProvider().removeSelectionChangedListener(this); > DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextProvider(fContextProviderProxy); > fContextProviderProxy.dispose(); >@@ -1024,6 +1167,8 @@ > public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { > setActive(page.findView(getSite().getId()) != null); > updateObjects(); >+ setDebugToolbarInView( isDebugToolbarInViewInPerspective(getSite().getPage().getPerspective()) ); >+ updateCheckedDebugToolBarAction(); > } > > /* (non-Javadoc) >@@ -1125,6 +1270,28 @@ > menu.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS)); > } > >+ public void contextManagerChanged(ContextManagerEvent event) { >+ if (event.isActiveContextsChanged()) { >+ Set oldContexts = event.getPreviouslyActiveContextIds(); >+ Set newContexts = event.getContextManager().getActiveContextIds(); >+ if (oldContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET) != >+ newContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET)) >+ { >+ updateCheckedDebugToolBarAction(); >+ } >+ } >+ } >+ >+ private void updateCheckedDebugToolBarAction() { >+ boolean debugToolBarInView = isDebugToolbarInView(); >+ boolean toolbarActionSetActive = fContextService.getActiveContextIds().contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET); >+ for (int i = 0; i < fDebugToolBarActions.length; i++) { >+ fDebugToolBarActions[i].setChecked( >+ fDebugToolBarActions[i].getDebugViewToolbar() == debugToolBarInView && >+ fDebugToolBarActions[i].getDebugToolbarActionSet() == toolbarActionSetActive); >+ } >+ } >+ > /** > * Updates the enabled state of the given action based on the selection > * and adds to the menu if enabled. >Index: ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java,v >retrieving revision 1.4 >diff -u -r1.4 LaunchViewMessages.java >--- ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java 31 Mar 2009 19:20:42 -0000 1.4 >+++ ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java 15 Sep 2011 18:09:21 -0000 >@@ -32,6 +32,17 @@ > public static String BreadcrumbDropDownAutoExpandAction_tooltip; > public static String BreadcrumbDropDownAutoExpandAction_description; > >+ public static String LaunchView_ToolBarMenu_label; >+ public static String DebugToolBarAction_View_label; >+ public static String DebugToolBarAction_View_tooltip; >+ public static String DebugToolBarAction_View_description; >+ public static String DebugToolBarAction_Window_label; >+ public static String DebugToolBarAction_Window_tooltip; >+ public static String DebugToolBarAction_Window_description; >+ public static String DebugToolBarAction_Both_label; >+ public static String DebugToolBarAction_Both_tooltip; >+ public static String DebugToolBarAction_Both_description; >+ > static { > // load message values from bundle file > NLS.initializeMessages(BUNDLE_NAME, LaunchViewMessages.class); >Index: ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties,v >retrieving revision 1.6 >diff -u -r1.6 LaunchViewMessages.properties >--- ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties 6 May 2009 19:06:01 -0000 1.6 >+++ ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties 15 Sep 2011 18:09:21 -0000 >@@ -25,3 +25,15 @@ > BreadcrumbDropDownAutoExpandAction_label=Auto-&Expand Breadcrumb > BreadcrumbDropDownAutoExpandAction_tooltip=Auto-Expand Breadcrumb > BreadcrumbDropDownAutoExpandAction_description=In the breadcrumb drop-down, automatically expand elements to reveal full selection in view. >+ >+LaunchView_ToolBarMenu_label=&Debug Toolbar >+DebugToolBarAction_View_label=&Debug View >+DebugToolBarAction_View_tooltip=Debug View >+DebugToolBarAction_View_description=Show debug actions in Debug view toolbar >+DebugToolBarAction_Window_label=&Main Toolbar >+DebugToolBarAction_Window_tooltip=Main Toolbar >+DebugToolBarAction_Window_description=Show debug action in the Window's main toolbar >+DebugToolBarAction_Both_label=&Both >+DebugToolBarAction_Both_tooltip=Both >+DebugToolBarAction_Both_description=Show debug actions in both toolbars >+ >Index: ui/org/eclipse/debug/ui/IDebugUIConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java,v >retrieving revision 1.191 >diff -u -r1.191 IDebugUIConstants.java >--- ui/org/eclipse/debug/ui/IDebugUIConstants.java 7 Jul 2011 05:38:25 -0000 1.191 >+++ ui/org/eclipse/debug/ui/IDebugUIConstants.java 15 Sep 2011 18:09:21 -0000 >@@ -612,7 +612,23 @@ > */ > public static final String DEBUG_ACTION_SET= PLUGIN_ID + ".debugActionSet"; //$NON-NLS-1$ > >- >+ /** >+ * Debug Toolbar action set identifier (value <code>"org.eclipse.debug.ui.debugToolbarActionSet"</code>). >+ * >+ * @since 3.8 >+ */ >+ public static final String DEBUG_TOOLBAR_ACTION_SET= PLUGIN_ID + ".debugToolbarActionSet"; //$NON-NLS-1$ >+ >+ /** >+ * System property which indicates whether the common debugging actions >+ * should be shown in the Debug view, as opposed to the top level >+ * toolbar. Actions contributing to the debug view can use this property >+ * to control their visibility. >+ * >+ * @since 3.8 >+ */ >+ public static final String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$NON-NLS-1$ >+ > /** > * Launch action set identifier (value <code>"org.eclipse.debug.ui.launchActionSet"</code>). > */ >#P org.eclipse.jdt.doc.user >Index: contexts_Debugger.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.doc.user/contexts_Debugger.xml,v >retrieving revision 1.136 >diff -u -r1.136 contexts_Debugger.xml >--- contexts_Debugger.xml 29 Jun 2011 16:06:08 -0000 1.136 >+++ contexts_Debugger.xml 15 Sep 2011 18:09:22 -0000 >@@ -543,6 +543,18 @@ > <topic href="reference/views/debug/ref-debug_view.htm" label="Debug View"/> > <topic href="reference/views/debug/ref-breadcrumb.htm" label="Debug Breadcrumb"/> > </context> >+ <context id="debug_toolbar_view_action_context"> >+ <description>Configures the common debug actions to appear in the Debug view's toolbar.</description> >+ <topic href="reference/views/debug/ref-debug_view.htm" label="Debug View"/> >+ </context> >+ <context id="debug_toolbar_window_action_context"> >+ <description>Configures the common debug actions to appear in the Window's main toolbar.</description> >+ <topic href="reference/views/debug/ref-debug_view.htm" label="Debug View"/> >+ </context> >+ <context id="debug_toolbar_both_action_context"> >+ <description>Configures the common debug actions to appear both in the Debug view's toolbar and in the Window's main toolbar.</description> >+ <topic href="reference/views/debug/ref-debug_view.htm" label="Debug View"/> >+ </context> > > <!-- > Detail Pane
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258767
:
156298
|
156299
|
185360
|
189627
|
199366
|
203180
|
203431
|
203868