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 156299 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 implementation.
20100115_258767-2.patch (text/plain), 19.68 KB, created by
Pawel Piech
on 2010-01-15 19:41:49 EST
(
hide
)
Description:
Updated implementation.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2010-01-15 19:41:49 EST
Size:
19.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/plugin.properties,v >retrieving revision 1.252 >diff -u -r1.252 plugin.properties >--- plugin.properties 11 Sep 2009 18:54:30 -0000 1.252 >+++ plugin.properties 16 Jan 2010 00:41:02 -0000 >@@ -50,6 +50,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 >@@ -73,6 +74,7 @@ > DetailPaneFontDefinition.description=The detail pane text font is used in the detail panes of debug views. > DetailPaneFactoriesExtension.name=Detail Pane Factories > DisableBreakpointsAction.label=&Disable >+DisconnectAction.label=&Disconnect > EnableBreakpointsAction.label=&Enable > ExpandAll.label=Expand All > ExpandAll.tooltip=Expand All >@@ -185,6 +187,9 @@ > ActionDefinition.addMemoryBlock.name= Add Memory Block > ActionDefinition.addMemoryBlock.description=Add Memory block > >+ActionDefinition.disconnect.name=Disconnect >+ActionDefinition.disconnect.description=Disconnect >+ > ActionDefinition.toggleStepFilters.name= Use Step Filters > ActionDefinition.toggleStepFilters.description= Toggles enablement of debug step filters > >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/plugin.xml,v >retrieving revision 1.444 >diff -u -r1.444 plugin.xml >--- plugin.xml 21 Dec 2009 19:09:22 -0000 1.444 >+++ plugin.xml 16 Jan 2010 00:41:04 -0000 >@@ -353,6 +353,17 @@ > menubarPath="org.eclipse.ui.run/stepGroup"> > </action> > <action >+ id="org.eclipse.debug.ui.actions.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="%DisconnectAction.label" >+ menubarPath="org.eclipse.ui.run/stepGroup"> >+ </action> >+ <action > id="org.eclipse.debug.ui.actions.Suspend" > hoverIcon="$nl$/icons/full/elcl16/suspend_co.gif" > class="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandActionDelegate" >@@ -376,6 +387,111 @@ > </action> > </actionSet> > <actionSet >+ label="%DebugToolbarActionSet.label" >+ visible="false" >+ id="org.eclipse.debug.ui.debugToolbarActionSet"> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.TerminateCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Terminate" >+ disabledIcon="$nl$/icons/full/dlcl16/terminate_co.gif" >+ helpContextId="terminate_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/terminate_co.gif" >+ icon="$nl$/icons/full/elcl16/terminate_co.gif" >+ id="org.eclipse.debug.ui.actions.Terminate" >+ label="%TerminateAction.label" >+ toolbarPath="debug/runGroup"> >+ </action> >+ <action >+ id="org.eclipse.debug.ui.actions.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="%DisconnectAction.label" >+ toolbarPath="debug/runGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Suspend" >+ disabledIcon="$nl$/icons/full/dlcl16/suspend_co.gif" >+ helpContextId="suspend_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/suspend_co.gif" >+ icon="$nl$/icons/full/elcl16/suspend_co.gif" >+ id="org.eclipse.debug.ui.actions.Suspend" >+ label="%SuspendAction.label" >+ toolbarPath="debug/runGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.ResumeCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.Resume" >+ disabledIcon="$nl$/icons/full/dlcl16/resume_co.gif" >+ helpContextId="resume_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/resume_co.gif" >+ icon="$nl$/icons/full/elcl16/resume_co.gif" >+ id="org.eclipse.debug.ui.actions.Resume" >+ label="%ResumeAction.label" >+ toolbarPath="debug/runGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.actions.RetargetRunToLineAction" >+ definitionId="org.eclipse.debug.ui.commands.RunToLine" >+ disabledIcon="$nl$/icons/full/dlcl16/runtoline_co.gif" >+ helpContextId="run_to_line_action_context" >+ icon="$nl$/icons/full/elcl16/runtoline_co.gif" >+ id="org.eclipse.debug.ui.actions.RunToLine" >+ label="%RunToLine.label" >+ toolbarPath="debug/stepGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.ToggleStepFiltersCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.ToggleStepFilters" >+ disabledIcon="$nl$/icons/full/dlcl16/stepbystep_co.gif" >+ helpContextId="step_with_filters_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/stepbystep_co.gif" >+ icon="$nl$/icons/full/elcl16/stepbystep_co.gif" >+ id="org.eclipse.debug.ui.actions.ToggleStepFilters" >+ label="%StepWithFiltersAction.label" >+ state="false" >+ style="toggle" >+ toolbarPath="debug/stepGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.StepReturnCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepReturn" >+ disabledIcon="$nl$/icons/full/dlcl16/stepreturn_co.gif" >+ helpContextId="step_return_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/stepreturn_co.gif" >+ icon="$nl$/icons/full/elcl16/stepreturn_co.gif" >+ id="org.eclipse.debug.ui.actions.StepReturn" >+ label="%StepReturnAction.label" >+ toolbarPath="debug/stepGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepOver" >+ disabledIcon="$nl$/icons/full/dlcl16/stepover_co.gif" >+ helpContextId="step_over_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/stepover_co.gif" >+ icon="$nl$/icons/full/elcl16/stepover_co.gif" >+ id="org.eclipse.debug.ui.actions.StepOver" >+ label="%StepOverAction.label" >+ toolbarPath="debug/stepGroup"> >+ </action> >+ <action >+ class="org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandActionDelegate" >+ definitionId="org.eclipse.debug.ui.commands.StepInto" >+ disabledIcon="$nl$/icons/full/dlcl16/stepinto_co.gif" >+ helpContextId="step_into_action_context" >+ hoverIcon="$nl$/icons/full/elcl16/stepinto_co.gif" >+ icon="$nl$/icons/full/elcl16/stepinto_co.gif" >+ id="org.eclipse.debug.ui.actions.StepInto" >+ label="%StepIntoAction.label" >+ toolbarPath="debug/stepGroup"> >+ </action> >+ </actionSet> >+ <actionSet > label="%LaunchActionSet.label" > visible="false" > id="org.eclipse.debug.ui.launchActionSet"> >@@ -1631,6 +1747,13 @@ > name="%ActionDefinition.terminate.name"> > </command> > <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%ActionDefinition.disconnect.description" >+ helpContextId="disconnect_action_context" >+ id="org.eclipse.debug.ui.commands.Disconnect" >+ name="%ActionDefinition.disconnect.name"> >+ </command> >+ <command > name="%ActionDefinition.terminateAndRelaunch.name" > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.terminateAndRelaunch.description" >@@ -1809,6 +1932,11 @@ > commandId="org.eclipse.debug.ui.commands.Terminate" > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> > <key >+ sequence="M1+M2+F2" >+ contextId="org.eclipse.debug.ui.debugging" >+ commandId="org.eclipse.debug.ui.commands.Disconnect" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >+ <key > sequence="F11" > > commandId="org.eclipse.debug.ui.commands.DebugLast" >Index: ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java,v >retrieving revision 1.108 >diff -u -r1.108 IInternalDebugUIConstants.java >--- ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java 11 Sep 2009 18:54:30 -0000 1.108 >+++ ui/org/eclipse/debug/internal/ui/IInternalDebugUIConstants.java 16 Jan 2010 00:41:05 -0000 >@@ -427,4 +427,11 @@ > * @since 3.4 > */ > public static final String THEME_CONSOLE_COLOR_STD_ERR= "org.eclipse.debug.ui.console.stream.err"; //$NON-NLS-1$ >+ >+ /** >+ * Action set that enables the top-level debug toolbar. >+ * >+ * @since 3.6 >+ */ >+ public static final String ID_ACTION_SET_DEBUG_TOOLBAR = "org.eclipse.debug.ui.debugToolbarActionSet"; //$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,27 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Wind River Systems 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: >+ * Wind River Systems - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.debug.internal.ui.commands.actions; >+ >+/** >+ * Disconnect action delegate. >+ * >+ * @since 3.6 >+ */ >+public class DisconnectCommandActionDelegate extends DebugCommandActionDelegate { >+ >+ public DisconnectCommandActionDelegate() { >+ super(); >+ setAction(new DisconnectCommandAction()); >+ } >+ >+ >+} >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.199 >diff -u -r1.199 LaunchView.java >--- ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java 1 Dec 2009 14:49:22 -0000 1.199 >+++ ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java 16 Jan 2010 00:41:07 -0000 >@@ -20,7 +20,10 @@ > import java.io.OutputStreamWriter; > import java.util.ArrayList; > import java.util.Iterator; >+import java.util.Set; > >+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; >@@ -39,6 +42,7 @@ > import org.eclipse.debug.internal.ui.DebugUIPlugin; > import org.eclipse.debug.internal.ui.DelegatingModelPresentation; > import org.eclipse.debug.internal.ui.IDebugHelpContextIds; >+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; > import org.eclipse.debug.internal.ui.actions.AddToFavoritesAction; > import org.eclipse.debug.internal.ui.actions.EditLaunchConfigurationAction; > import org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandAction; >@@ -78,6 +82,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; >@@ -119,6 +124,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; >@@ -130,7 +136,7 @@ > 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$ > >@@ -225,6 +231,24 @@ > */ > private boolean fBreadcrumbDropDownAutoExpand = false; > >+ /** >+ * Context service for this view. Used to track whether debug toolbar >+ * action set is active. >+ * >+ * @since 3.6 >+ */ >+ private IContextService fContextService; >+ >+ /** >+ * Flag used in tracing the debug toolbar action set. It is used >+ * to show/hide debug actions in view toolbar. >+ * >+ * @since 3.6 >+ */ >+ private boolean fWasDebugToolbarActiveBeforeDialog = false; >+ >+ >+ > /** > * 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. >@@ -585,6 +609,8 @@ > } > } > }); >+ >+ fContextService.addContextManagerListener(this); > } > > /** >@@ -908,6 +934,7 @@ > super.init(site); > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > > /* (non-Javadoc) >@@ -917,6 +944,7 @@ > super.init(site, memento); > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > > /* (non-Javadoc) >@@ -967,7 +995,17 @@ > tbm.add(new GroupMarker(IDebugUIConstants.STEP_RETURN_GROUP)); > tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP)); > tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP)); >- >+ >+ if (!fContextService.getActiveContextIds().contains(IInternalDebugUIConstants.ID_ACTION_SET_DEBUG_TOOLBAR)) { >+ addDebugToolbarActions(tbm); >+ } >+ } >+ >+ /** >+ * Adds the view toolbar actions to the toolbar >+ * manager. >+ */ >+ 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)); >@@ -980,12 +1018,58 @@ > 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 void contextManagerChanged(ContextManagerEvent event) { >+ if (event.isActiveContextsChanged()) { >+ Set oldContexts = event.getPreviouslyActiveContextIds(); >+ Set newContexts = event.getContextManager().getActiveContextIds(); >+ boolean wasInDialog = oldContexts.contains(IContextService.CONTEXT_ID_DIALOG); >+ boolean inDialog = newContexts.contains(IContextService.CONTEXT_ID_DIALOG); >+ boolean wasDebugToolbarActive = oldContexts.contains(IInternalDebugUIConstants.ID_ACTION_SET_DEBUG_TOOLBAR); >+ boolean debugToolbarActive = newContexts.contains(IInternalDebugUIConstants.ID_ACTION_SET_DEBUG_TOOLBAR); >+ if (!wasInDialog && inDialog) { >+ fWasDebugToolbarActiveBeforeDialog = wasDebugToolbarActive || debugToolbarActive; >+ } else if (wasInDialog && !inDialog) { >+ wasDebugToolbarActive = fWasDebugToolbarActiveBeforeDialog; >+ } >+ if (!inDialog) { >+ if (debugToolbarActive && !wasDebugToolbarActive) { >+ removeDebugToolbarActions(getViewSite().getActionBars().getToolBarManager()); >+ getViewSite().getActionBars().updateActionBars(); >+ } else if (!debugToolbarActive && wasDebugToolbarActive) { >+ addDebugToolbarActions(getViewSite().getActionBars().getToolBarManager()); >+ getViewSite().getActionBars().updateActionBars(); >+ } >+ } >+ } >+ } >+ > /* (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();
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