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 203868 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 patch that corrects the keyboard shortcuts.
Bug-258767--debug-viewmenu-support-for-top-level-deb.patch (text/plain), 54.54 KB, created by
Pawel Piech
on 2011-09-22 16:56:41 EDT
(
hide
)
Description:
Updated patch that corrects the keyboard shortcuts.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2011-09-22 16:56:41 EDT
Size:
54.54 KB
patch
obsolete
>diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF >index 86a32d2..fbb62c8 100644 >--- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF >+++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF >@@ -3,5 +3,5 @@ > 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 >diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties >index 2d8faf4..aeb1c24 100644 >--- a/org.eclipse.debug.ui/plugin.properties >+++ b/org.eclipse.debug.ui/plugin.properties >@@ -1,4 +1,4 @@ > ############################################################################### >-# Copyright (c) 2000, 2010 IBM Corporation and others. >+# 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 >@@ -11,4 +11,5 @@ > # 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) > ############################################################################### > >@@ -52,4 +53,5 @@ > CopyRegistersToClipboardAction.label=Copy &Registers > DebugActionSet.label=Debug >+DebugToolbarActionSet.label=Debug Toolbar > debugCurrentInstructionPointer=Debug Current Instruction Pointer > debugCallStack=Debug Call Stack >@@ -130,4 +132,6 @@ > 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 >@@ -220,4 +224,10 @@ > 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 >diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml >index 6357bba..81374c0 100644 >--- a/org.eclipse.debug.ui/plugin.xml >+++ b/org.eclipse.debug.ui/plugin.xml >@@ -11,4 +11,5 @@ > 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) > --> > >@@ -330,5 +331,4 @@ > 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" >@@ -380,4 +380,109 @@ > label="%ResumeAction.label" > menubarPath="org.eclipse.ui.run/stepGroup"> >+ </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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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" >+ 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> >@@ -613,4 +718,39 @@ > </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> >@@ -1623,5 +1763,20 @@ > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.toggleStepFilters.description" >- id="org.eclipse.debug.ui.commands.ToggleStepFilters"> >+ id="org.eclipse.debug.ui.commands.ToggleStepFilters" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.ToggleStepFiltersCommandHandler"> >+ </command> >+ <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%ActionDefinition.dropToFrame.description" >+ id="org.eclipse.debug.ui.commands.DropToFrame" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandHandler" >+ name="%ActionDefinition.dropToFrame.name"> >+ </command> >+ <command >+ categoryId="org.eclipse.debug.ui.category.run" >+ description="%ActionDefinition.disconnect.discrption" >+ id="org.eclipse.debug.ui.commands.Disconnect" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandHandler" >+ name="%ActionDefinition.disconnect.name"> > </command> > <command >@@ -1629,11 +1784,13 @@ > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.stepInto.description" >- id="org.eclipse.debug.ui.commands.StepInto"> >+ id="org.eclipse.debug.ui.commands.StepInto" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandHandler"> > </command> > <command >- name="%ActionDefinition.stepOver.name" > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.stepOver.description" >- id="org.eclipse.debug.ui.commands.StepOver"> >+ id="org.eclipse.debug.ui.commands.StepOver" >+ name="%ActionDefinition.stepOver.name" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandHandler"> > </command> > <command >@@ -1641,5 +1798,6 @@ > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.stepReturn.description" >- id="org.eclipse.debug.ui.commands.StepReturn"> >+ id="org.eclipse.debug.ui.commands.StepReturn" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepReturnCommandHandler"> > </command> > <command >@@ -1647,5 +1805,6 @@ > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.resume.description" >- id="org.eclipse.debug.ui.commands.Resume"> >+ id="org.eclipse.debug.ui.commands.Resume" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.ResumeCommandHandler"> > </command> > <command >@@ -1654,4 +1813,5 @@ > helpContextId="terminate_action_context" > id="org.eclipse.debug.ui.commands.Terminate" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.TerminateCommandHandler" > name="%ActionDefinition.terminate.name"> > </command> >@@ -1676,5 +1836,6 @@ > categoryId="org.eclipse.debug.ui.category.run" > description="%ActionDefinition.suspend.description" >- id="org.eclipse.debug.ui.commands.Suspend"> >+ id="org.eclipse.debug.ui.commands.Suspend" >+ defaultHandler="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandHandler"> > </command> > <command >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java >index ace7df9..d7361f3 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * 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 >@@ -76,4 +76,7 @@ > 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 >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java >index d624598..5e09d35 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * 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 >@@ -78,4 +78,9 @@ > } > >+ public void init(IAction action) { >+ super.init(action); >+ action.setActionDefinitionId("org.eclipse.debug.ui.commands.RunToLine"); >+ } >+ > /* (non-Javadoc) > * @see org.eclipse.debug.internal.ui.actions.RetargetAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart) >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java >index ce50c13..3c784dc 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * 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 >@@ -50,4 +50,7 @@ > public void init(IAction action) { > fDebugAction.setActionProxy(action); >+ >+ // Ensure that the key accelerator is shown in tool-tip >+ action.setActionDefinitionId(fDebugAction.getActionDefinitionId()); > } > >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java >new file mode 100644 >index 0000000..611e5d4 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java >@@ -0,0 +1,24 @@ >+/***************************************************************** >+ * Copyright (c) 2010, 2011 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()); >+ } >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandHandler.java >new file mode 100644 >index 0000000..435e83f >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IDisconnectHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class DisconnectCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IDisconnectHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java >new file mode 100644 >index 0000000..f5b2f0b >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java >@@ -0,0 +1,24 @@ >+/***************************************************************** >+ * Copyright (c) 2010, 2011 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()); >+ } >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandHandler.java >new file mode 100644 >index 0000000..627de91 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IDisconnectHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class DropToFrameCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IDisconnectHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandHandler.java >new file mode 100644 >index 0000000..af8c669 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IResumeHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class ResumeCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IResumeHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandHandler.java >new file mode 100644 >index 0000000..2158b10 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IStepIntoHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class StepIntoCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IStepIntoHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java >index 71a2040..2412f03 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java >@@ -12,4 +12,6 @@ > package org.eclipse.debug.internal.ui.commands.actions; > >+import org.eclipse.jface.action.IAction; >+ > /** > * Step over action delegate. >@@ -24,4 +26,8 @@ > } > >+ public void init(IAction action) { >+ super.init(action); >+ } >+ > > } >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandHandler.java >new file mode 100644 >index 0000000..b93551e >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IStepOverHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class StepOverCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IStepOverHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandHandler.java >new file mode 100644 >index 0000000..df42742 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IStepReturnHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class StepReturnCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IStepReturnHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandHandler.java >new file mode 100644 >index 0000000..2a162df >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.ISuspendHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class SuspendCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return ISuspendHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandHandler.java >new file mode 100644 >index 0000000..2eeb018 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.ITerminateHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class TerminateCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return ITerminateHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandHandler.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandHandler.java >new file mode 100644 >index 0000000..aad7dc9 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandHandler.java >@@ -0,0 +1,28 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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; >+ >+import org.eclipse.debug.core.commands.IStepFiltersHandler; >+import org.eclipse.debug.ui.actions.DebugCommandHandler; >+ >+/** >+ * Default handler for command. It ensures that the keyboard accelerator works even >+ * if the menu action set is not enabled. >+ * >+ * @since 3.8 >+ */ >+public class ToggleStepFiltersCommandHandler extends DebugCommandHandler { >+ >+ protected Class getCommandType() { >+ return IStepFiltersHandler.class; >+ } >+ >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java >index 1de50d7..d829914 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * 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 >@@ -296,4 +296,11 @@ > */ > 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$ > } > >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java >new file mode 100644 >index 0000000..5def549 >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java >@@ -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; >+ } >+} >+ >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >index 650e9c8..d017ca3 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >@@ -23,6 +23,10 @@ > 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; >@@ -68,4 +72,5 @@ > 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; >@@ -77,4 +82,5 @@ > 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; >@@ -116,4 +122,5 @@ > 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; >@@ -127,5 +134,8 @@ > 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$ >@@ -195,4 +205,8 @@ > > /** >+ */ >+ private DebugToolBarAction[] fDebugToolBarActions; >+ >+ /** > * Action that controls the breadcrumb drop-down auto-expand behavior. > * >@@ -200,4 +214,12 @@ > */ > private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction; >+ >+ /** >+ * Context service for this view. Used to track whether debug toolbar >+ * action set is active. >+ * >+ * @since 3.8 >+ */ >+ private IContextService fContextService; > > /** >@@ -215,5 +237,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 >@@ -230,4 +252,8 @@ > */ > private Map fHandlers = new HashMap(); >+ >+ private boolean fDebugToolbarInView = true; >+ >+ private Set fDebugToolbarHiddenPerspectives = new TreeSet(); > > /** >@@ -605,4 +631,6 @@ > } > >+ createDebugToolBarInViewActions(parent); >+ > // Add a resize listener for the view to activate breadcrumb as needed. > parent.addControlListener(new ControlListener() { >@@ -618,4 +646,6 @@ > } > }); >+ >+ fContextService.addContextManagerListener(this); > } > >@@ -706,5 +736,4 @@ > modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction); > viewMenu.add(modeSubmenu); >- viewMenu.add(new Separator()); > > modeSubmenu.addMenuListener(new IMenuListener() { >@@ -717,8 +746,40 @@ > } > }); >- > } > >- >+ /** >+ * 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. >@@ -859,4 +920,12 @@ > } > } >+ >+ 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()); > } > >@@ -868,4 +937,5 @@ > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > >@@ -877,4 +947,5 @@ > commonInit(site); > preferenceInit(site); >+ fContextService = (IContextService)site.getService(IContextService.class); > } > >@@ -905,4 +976,11 @@ > } > } >+ >+ 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); > } >@@ -927,5 +1005,11 @@ > 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)); >@@ -936,14 +1020,73 @@ > 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); >@@ -1025,4 +1168,6 @@ > setActive(page.findView(getSite().getId()) != null); > updateObjects(); >+ setDebugToolbarInView( isDebugToolbarInViewInPerspective(getSite().getPage().getPerspective()) ); >+ updateCheckedDebugToolBarAction(); > } > >@@ -1126,4 +1271,26 @@ > } > >+ 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 >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java >index a33ae0f..11bfe04 100755 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * 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 >@@ -33,4 +33,15 @@ > 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 >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties >index 839f9b7..799bb32 100755 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties >@@ -1,4 +1,4 @@ > ############################################################################### >-# Copyright (c) 2000, 2009 IBM Corporation and others. >+# 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 >@@ -26,2 +26,14 @@ > 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 >+ >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >index 013c412..7cdd455 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >@@ -613,5 +613,21 @@ > 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>).
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