Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 258767 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.debug.ui/META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 3-7 Link Here
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
4
Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true
5
Bundle-Version: 3.7.200.qualifier
5
Bundle-Version: 3.8.0.qualifier
6
Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
6
Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin
7
Bundle-Vendor: %providerName
7
Bundle-Vendor: %providerName
(-)a/org.eclipse.debug.ui/plugin.properties (-1 / +11 lines)
Lines 1-4 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2000, 2010 IBM Corporation and others.
2
# Copyright (c) 2000, 2011 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
Lines 11-14 Link Here
11
#     Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
11
#     Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
12
#     Wind River Systems - Ted Williams -[Memory View] Memory View: Workflow Enhancements (bug 215432)
12
#     Wind River Systems - Ted Williams -[Memory View] Memory View: Workflow Enhancements (bug 215432)
13
#     Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784)
13
###############################################################################
14
###############################################################################
14
15
Lines 52-55 Link Here
52
CopyRegistersToClipboardAction.label=Copy &Registers
53
CopyRegistersToClipboardAction.label=Copy &Registers
53
DebugActionSet.label=Debug
54
DebugActionSet.label=Debug
55
DebugToolbarActionSet.label=Debug Toolbar
54
debugCurrentInstructionPointer=Debug Current Instruction Pointer
56
debugCurrentInstructionPointer=Debug Current Instruction Pointer
55
debugCallStack=Debug Call Stack
57
debugCallStack=Debug Call Stack
Lines 130-133 Link Here
130
SuspendAction.label=&Suspend
132
SuspendAction.label=&Suspend
131
TerminateAction.label=&Terminate
133
TerminateAction.label=&Terminate
134
DropToFrame.label=Drop To Frame
135
Disconnect.label=Disconnect
132
ToggleBreakpointAction.label=Toggle Brea&kpoint
136
ToggleBreakpointAction.label=Toggle Brea&kpoint
133
ToggleBreakpointsTargetFactoriesExtension.name=Toggle Breakpoints Target Factories
137
ToggleBreakpointsTargetFactoriesExtension.name=Toggle Breakpoints Target Factories
Lines 220-223 Link Here
220
ActionDefinition.suspend.description=Suspend
224
ActionDefinition.suspend.description=Suspend
221
225
226
ActionDefinition.dropToFrame.name=Drop to Frame
227
ActionDefinition.dropToFrame.description=Drop to Frame
228
229
ActionDefinition.disconnect.name=Disconnect
230
ActionDefinition.disconnect.description=Disconnect
231
222
ActionDefinition.openProfile.name=Profile...
232
ActionDefinition.openProfile.name=Profile...
223
ActionDefinition.openProfile.description=Open profile launch configuration dialog
233
ActionDefinition.openProfile.description=Open profile launch configuration dialog
(-)a/org.eclipse.debug.ui/plugin.xml (-8 / +169 lines)
Lines 11-14 Link Here
11
         IBM Corporation - initial API and implementation
11
         IBM Corporation - initial API and implementation
12
         Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
12
         Patrick Chuong (Texas Instruments) - Improve usability of the breakpoint view (Bug 238956)
13
         Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784) 
13
 -->
14
 -->
14
15
Lines 330-334 Link Here
330
               hoverIcon="$nl$/icons/full/elcl16/stepover_co.gif"
331
               hoverIcon="$nl$/icons/full/elcl16/stepover_co.gif"
331
               class="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandActionDelegate"
332
               class="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandActionDelegate"
332
               definitionId="org.eclipse.debug.ui.commands.StepOver"
333
               disabledIcon="$nl$/icons/full/dlcl16/stepover_co.gif"
333
               disabledIcon="$nl$/icons/full/dlcl16/stepover_co.gif"
334
               icon="$nl$/icons/full/elcl16/stepover_co.gif"
334
               icon="$nl$/icons/full/elcl16/stepover_co.gif"
Lines 380-383 Link Here
380
               label="%ResumeAction.label"
380
               label="%ResumeAction.label"
381
               menubarPath="org.eclipse.ui.run/stepGroup">
381
               menubarPath="org.eclipse.ui.run/stepGroup">
382
         </action>
383
      </actionSet>
384
      <actionSet
385
            label="%DebugToolbarActionSet.label"
386
            visible="false"
387
            id="org.eclipse.debug.ui.debugToolbarActionSet">
388
         <action
389
               id="org.eclipse.debug.ui.actions.toolbar.ToggleStepFilters"
390
               hoverIcon="$nl$/icons/full/elcl16/stepbystep_co.gif"
391
               class="org.eclipse.debug.internal.ui.commands.actions.ToggleStepFiltersCommandActionDelegate"
392
               disabledIcon="$nl$/icons/full/dlcl16/stepbystep_co.gif"
393
               icon="$nl$/icons/full/elcl16/stepbystep_co.gif"
394
               helpContextId="step_with_filters_action_context"
395
               label="%StepWithFiltersAction.label"
396
               style="toggle"
397
               state="false"
398
               toolbarPath="org.eclipse.debug.ui.main.toolbar/renderGroup">
399
         </action>
400
         <action
401
               id="org.eclipse.debug.ui.actions.toolbar.DropToFrame"
402
               hoverIcon="$nl$/icons/full/elcl16/drop_to_frame.gif"
403
               class="org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandActionDelegate"
404
               helpContextId="drop_to_frame_action_context"
405
               icon="$nl$/icons/full/elcl16/drop_to_frame.gif"
406
               label="%DropToFrame.label"
407
               toolbarPath="org.eclipse.debug.ui.main.toolbar/emptyStepGroup">
408
         </action>
409
         <action
410
               id="org.eclipse.debug.ui.actions.toolbar.RunToLine"
411
               class="org.eclipse.debug.internal.ui.actions.RetargetRunToLineAction"
412
               helpContextId="run_to_line_action_context"
413
               disabledIcon="$nl$/icons/full/dlcl16/runtoline_co.gif"
414
               icon="$nl$/icons/full/elcl16/runtoline_co.gif"
415
               label="%RunToLine.label"
416
               toolbarPath="org.eclipse.debug.ui.main.toolbar/emptyStepGroup">
417
         </action>                  
418
         <action
419
               id="org.eclipse.debug.ui.actions.toolbar.StepReturn"
420
               hoverIcon="$nl$/icons/full/elcl16/stepreturn_co.gif"
421
               class="org.eclipse.debug.internal.ui.commands.actions.StepReturnCommandActionDelegate"
422
               disabledIcon="$nl$/icons/full/dlcl16/stepreturn_co.gif"
423
               icon="$nl$/icons/full/elcl16/stepreturn_co.gif"
424
               helpContextId="step_return_action_context"
425
               label="%StepReturnAction.label"
426
               toolbarPath="org.eclipse.debug.ui.main.toolbar/stepReturnGroup">
427
         </action>
428
         <action
429
               id="org.eclipse.debug.ui.actions.toolbar.StepOver"
430
               hoverIcon="$nl$/icons/full/elcl16/stepover_co.gif"
431
               class="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandActionDelegate"
432
               disabledIcon="$nl$/icons/full/dlcl16/stepover_co.gif"
433
               icon="$nl$/icons/full/elcl16/stepover_co.gif"
434
               helpContextId="step_over_action_context"
435
               label="%StepOverAction.label"
436
               toolbarPath="org.eclipse.debug.ui.main.toolbar/stepOverGroup">
437
         </action>
438
         <action
439
               id="org.eclipse.debug.ui.actions.toolbar.StepInto"
440
               hoverIcon="$nl$/icons/full/elcl16/stepinto_co.gif"
441
               class="org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandActionDelegate"
442
               disabledIcon="$nl$/icons/full/dlcl16/stepinto_co.gif"
443
               icon="$nl$/icons/full/elcl16/stepinto_co.gif"
444
               helpContextId="step_into_action_context"
445
               label="%StepIntoAction.label"
446
               toolbarPath="org.eclipse.debug.ui.main.toolbar/stepIntoGroup">
447
         </action>
448
         <action
449
               id="org.eclipse.debug.ui.actions.toolbar.Disconnect"
450
               hoverIcon="$nl$/icons/full/elcl16/disconnect_co.gif"
451
               class="org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandActionDelegate"
452
               disabledIcon="$nl$/icons/full/dlcl16/disconnect_co.gif"
453
               icon="$nl$/icons/full/elcl16/disconnect_co.gif"
454
               helpContextId="disconnect_action_context"
455
               label="%Disconnect.label"
456
               toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup">
457
         </action>
458
         <action
459
               id="org.eclipse.debug.ui.actions.toolbar.Terminate"
460
               hoverIcon="$nl$/icons/full/elcl16/terminate_co.gif"
461
               class="org.eclipse.debug.internal.ui.commands.actions.TerminateCommandActionDelegate"
462
               disabledIcon="$nl$/icons/full/dlcl16/terminate_co.gif"
463
               icon="$nl$/icons/full/elcl16/terminate_co.gif"
464
               helpContextId="terminate_action_context"
465
               label="%TerminateAction.label"
466
               toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup">
467
         </action>
468
         <action
469
               id="org.eclipse.debug.ui.actions.toolbar.Suspend"
470
               hoverIcon="$nl$/icons/full/elcl16/suspend_co.gif"
471
               class="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandActionDelegate"
472
               disabledIcon="$nl$/icons/full/dlcl16/suspend_co.gif"
473
               icon="$nl$/icons/full/elcl16/suspend_co.gif"
474
               helpContextId="suspend_action_context"
475
               label="%SuspendAction.label"
476
               toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup">
477
         </action>
478
         <action
479
               id="org.eclipse.debug.ui.actions.toolbar.Resume"
480
               hoverIcon="$nl$/icons/full/elcl16/resume_co.gif"
481
               class="org.eclipse.debug.internal.ui.commands.actions.ResumeCommandActionDelegate"
482
               disabledIcon="$nl$/icons/full/dlcl16/resume_co.gif"
483
               icon="$nl$/icons/full/elcl16/resume_co.gif"
484
               helpContextId="resume_action_context"
485
               label="%ResumeAction.label"
486
               toolbarPath="org.eclipse.debug.ui.main.toolbar/threadGroup">
382
         </action>
487
         </action>
383
      </actionSet>
488
      </actionSet>
Lines 613-616 Link Here
613
	           </dynamic>
718
	           </dynamic>
614
            </menu>         
719
            </menu>         
720
       </menuContribution>
721
       <menuContribution
722
             locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
723
          <toolbar
724
                id="org.eclipse.debug.ui.main.toolbar"
725
                label="%DebugActionSet.label">
726
             <separator
727
                   name="threadGroup"
728
                   visible="true">
729
             </separator>
730
             <separator
731
                   name="stepGroup"
732
                   visible="true">
733
             </separator>
734
             <separator
735
                   name="stepIntoGroup"
736
                   visible="false">
737
             </separator>
738
             <separator
739
                   name="stepOverGroup"
740
                   visible="false">
741
             </separator>
742
             <separator
743
                   name="stepReturnGroup"
744
                   visible="false">
745
             </separator>
746
             <separator
747
                   name="emptyStepGroup"
748
                   visible="false">
749
             </separator>
750
             <separator
751
                   name="renderGroup"
752
                   visible="true">
753
             </separator>
754
          </toolbar>
615
       </menuContribution>
755
       </menuContribution>
616
   </extension>  
756
   </extension>  
Lines 1623-1627 Link Here
1623
            categoryId="org.eclipse.debug.ui.category.run"
1763
            categoryId="org.eclipse.debug.ui.category.run"
1624
            description="%ActionDefinition.toggleStepFilters.description"
1764
            description="%ActionDefinition.toggleStepFilters.description"
1625
            id="org.eclipse.debug.ui.commands.ToggleStepFilters">
1765
            id="org.eclipse.debug.ui.commands.ToggleStepFilters"
1766
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.ToggleStepFiltersCommandHandler">
1767
      </command>
1768
      <command
1769
            categoryId="org.eclipse.debug.ui.category.run"
1770
            description="%ActionDefinition.dropToFrame.description"
1771
            id="org.eclipse.debug.ui.commands.DropToFrame"
1772
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.DropToFrameCommandHandler"
1773
            name="%ActionDefinition.dropToFrame.name">
1774
      </command>
1775
      <command
1776
            categoryId="org.eclipse.debug.ui.category.run"
1777
            description="%ActionDefinition.disconnect.discrption"
1778
            id="org.eclipse.debug.ui.commands.Disconnect"
1779
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.DisconnectCommandHandler"
1780
            name="%ActionDefinition.disconnect.name">
1626
      </command>
1781
      </command>
1627
      <command
1782
      <command
Lines 1629-1639 Link Here
1629
            categoryId="org.eclipse.debug.ui.category.run"
1784
            categoryId="org.eclipse.debug.ui.category.run"
1630
            description="%ActionDefinition.stepInto.description"
1785
            description="%ActionDefinition.stepInto.description"
1631
            id="org.eclipse.debug.ui.commands.StepInto">
1786
            id="org.eclipse.debug.ui.commands.StepInto"
1787
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepIntoCommandHandler">
1632
      </command>
1788
      </command>
1633
      <command
1789
      <command
1634
            name="%ActionDefinition.stepOver.name"
1635
            categoryId="org.eclipse.debug.ui.category.run"
1790
            categoryId="org.eclipse.debug.ui.category.run"
1636
            description="%ActionDefinition.stepOver.description"
1791
            description="%ActionDefinition.stepOver.description"
1637
            id="org.eclipse.debug.ui.commands.StepOver">
1792
            id="org.eclipse.debug.ui.commands.StepOver"
1793
            name="%ActionDefinition.stepOver.name"
1794
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepOverCommandHandler">
1638
      </command>
1795
      </command>
1639
      <command
1796
      <command
Lines 1641-1645 Link Here
1641
            categoryId="org.eclipse.debug.ui.category.run"
1798
            categoryId="org.eclipse.debug.ui.category.run"
1642
            description="%ActionDefinition.stepReturn.description"
1799
            description="%ActionDefinition.stepReturn.description"
1643
            id="org.eclipse.debug.ui.commands.StepReturn">
1800
            id="org.eclipse.debug.ui.commands.StepReturn"
1801
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.StepReturnCommandHandler">
1644
      </command>
1802
      </command>
1645
      <command
1803
      <command
Lines 1647-1651 Link Here
1647
            categoryId="org.eclipse.debug.ui.category.run"
1805
            categoryId="org.eclipse.debug.ui.category.run"
1648
            description="%ActionDefinition.resume.description"
1806
            description="%ActionDefinition.resume.description"
1649
            id="org.eclipse.debug.ui.commands.Resume">
1807
            id="org.eclipse.debug.ui.commands.Resume"
1808
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.ResumeCommandHandler">
1650
      </command>
1809
      </command>
1651
      <command
1810
      <command
Lines 1654-1657 Link Here
1654
            helpContextId="terminate_action_context"
1813
            helpContextId="terminate_action_context"
1655
            id="org.eclipse.debug.ui.commands.Terminate"
1814
            id="org.eclipse.debug.ui.commands.Terminate"
1815
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.TerminateCommandHandler"
1656
            name="%ActionDefinition.terminate.name">
1816
            name="%ActionDefinition.terminate.name">
1657
      </command>
1817
      </command>
Lines 1676-1680 Link Here
1676
            categoryId="org.eclipse.debug.ui.category.run"
1836
            categoryId="org.eclipse.debug.ui.category.run"
1677
            description="%ActionDefinition.suspend.description"
1837
            description="%ActionDefinition.suspend.description"
1678
            id="org.eclipse.debug.ui.commands.Suspend">
1838
            id="org.eclipse.debug.ui.commands.Suspend"
1839
            defaultHandler="org.eclipse.debug.internal.ui.commands.actions.SuspendCommandHandler">
1679
      </command>
1840
      </command>
1680
      <command
1841
      <command
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/IDebugHelpContextIds.java (-1 / +4 lines)
Lines 1-4 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
Lines 76-79 Link Here
76
    public static final String DEBUG_VIEW_MODE_COMPACT_ACTION = PREFIX + "debug_view_mode_compact_action_context"; //$NON-NLS-1$
76
    public static final String DEBUG_VIEW_MODE_COMPACT_ACTION = PREFIX + "debug_view_mode_compact_action_context"; //$NON-NLS-1$
77
    public static final String DEBUG_VIEW_DROP_DOWN_AUTOEXPAND_ACTION = PREFIX + "debug_view_drop_down_autoexpand_action_context"; //$NON-NLS-1$
77
    public static final String DEBUG_VIEW_DROP_DOWN_AUTOEXPAND_ACTION = PREFIX + "debug_view_drop_down_autoexpand_action_context"; //$NON-NLS-1$
78
    public static final String DEBUG_TOOLBAR_VIEW_ACTION = PREFIX + "debug_toolbar_view_action_context"; //$NON-NLS-1$
79
    public static final String DEBUG_TOOLBAR_WINDOW_ACTION = PREFIX + "debug_toolbar_window_action_context"; //$NON-NLS-1$
80
    public static final String DEBUG_TOOLBAR_BOTH_ACTION = PREFIX + "debug_toolbar_both_action_context"; //$NON-NLS-1$
78
81
79
	// Views
82
	// Views
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/RetargetRunToLineAction.java (-1 / +6 lines)
Lines 1-4 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2000, 2008 IBM Corporation and others.
2
 *  Copyright (c) 2000, 2011 IBM Corporation and others.
3
 *  All rights reserved. This program and the accompanying materials
3
 *  All rights reserved. This program and the accompanying materials
4
 *  are made available under the terms of the Eclipse Public License v1.0
4
 *  are made available under the terms of the Eclipse Public License v1.0
Lines 78-81 Link Here
78
	}
78
	}
79
		
79
		
80
	public void init(IAction action) {
81
	    super.init(action);
82
	    action.setActionDefinitionId("org.eclipse.debug.ui.commands.RunToLine");
83
	}
84
	
80
	/* (non-Javadoc)
85
	/* (non-Javadoc)
81
	 * @see org.eclipse.debug.internal.ui.actions.RetargetAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
86
	 * @see org.eclipse.debug.internal.ui.actions.RetargetAction#canPerformAction(java.lang.Object, org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java (-1 / +4 lines)
Lines 1-4 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
Lines 50-53 Link Here
50
    public void init(IAction action) {
50
    public void init(IAction action) {
51
        fDebugAction.setActionProxy(action);
51
        fDebugAction.setActionProxy(action);
52
53
        // Ensure that the key accelerator is shown in tool-tip
54
        action.setActionDefinitionId(fDebugAction.getActionDefinitionId());
52
    }
55
    }
53
    
56
    
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandActionDelegate.java (+24 lines)
Added Link Here
1
/*****************************************************************
2
 * Copyright (c) 2010, 2011 Texas Instruments and others
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784)
10
 *****************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
/**
14
 * Disconnect action delegate.
15
 * 
16
 * @since 3.7
17
 */
18
public class DisconnectCommandActionDelegate extends DebugCommandActionDelegate {
19
	
20
	public DisconnectCommandActionDelegate() {
21
		super();
22
		setAction(new DisconnectCommandAction());
23
	}
24
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DisconnectCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IDisconnectHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class DisconnectCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IDisconnectHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandActionDelegate.java (+24 lines)
Added Link Here
1
/*****************************************************************
2
 * Copyright (c) 2010, 2011 Texas Instruments and others
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784)
10
 *****************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
/**
14
 * Drop to Frame action delegate.
15
 * 
16
 * @since 3.7
17
 */
18
public class DropToFrameCommandActionDelegate extends DebugCommandActionDelegate {
19
20
	public DropToFrameCommandActionDelegate() {
21
		super();
22
		setAction(new DropToFrameCommandAction());
23
	}
24
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DropToFrameCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IDisconnectHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class DropToFrameCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IDisconnectHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ResumeCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IResumeHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class ResumeCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IResumeHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepIntoCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IStepIntoHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class StepIntoCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IStepIntoHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandActionDelegate.java (+6 lines)
Lines 12-15 Link Here
12
package org.eclipse.debug.internal.ui.commands.actions;
12
package org.eclipse.debug.internal.ui.commands.actions;
13
13
14
import org.eclipse.jface.action.IAction;
15
14
/**
16
/**
15
 * Step over action delegate.
17
 * Step over action delegate.
Lines 24-27 Link Here
24
    }
26
    }
25
27
28
    public void init(IAction action) {
29
        super.init(action);
30
    }
31
    
26
    
32
    
27
}
33
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepOverCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IStepOverHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class StepOverCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IStepOverHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/StepReturnCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IStepReturnHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class StepReturnCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IStepReturnHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/SuspendCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.ISuspendHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class SuspendCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return ISuspendHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.ITerminateHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class TerminateCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return ITerminateHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersCommandHandler.java (+28 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 Wind River Systems and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.commands.actions;
12
13
import org.eclipse.debug.core.commands.IStepFiltersHandler;
14
import org.eclipse.debug.ui.actions.DebugCommandHandler;
15
16
/**
17
 * Default handler for command.  It ensures that the keyboard accelerator works even
18
 * if the menu action set is not enabled.
19
 * 
20
 * @since 3.8
21
 */
22
public class ToggleStepFiltersCommandHandler extends DebugCommandHandler {
23
24
    protected Class getCommandType() {
25
        return IStepFiltersHandler.class;
26
    }
27
    
28
}
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/IDebugPreferenceConstants.java (-1 / +8 lines)
Lines 1-4 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
Lines 296-299 Link Here
296
     */
296
     */
297
    public static final String DEBUG_VIEW_BREADCRUMB_AUTO_EXPAND_DROP_DOWN = "org.eclispe.debug.ui.Debug_view.Breadcrumb.dropDownAutoexpand"; //$NON-NLS-1$
297
    public static final String DEBUG_VIEW_BREADCRUMB_AUTO_EXPAND_DROP_DOWN = "org.eclispe.debug.ui.Debug_view.Breadcrumb.dropDownAutoexpand"; //$NON-NLS-1$
298
    
299
    /**
300
     * Perspectives in which the debug toolbar is hidden.
301
     * 
302
     * @since 3.8
303
     */
304
    public static final String DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES = "org.eclispe.debug.ui.Debug_view.debug_toolbar_hidden_perspectives"; //$NON-NLS-1$
298
}
305
}
299
306
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugToolBarAction.java (+92 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.debug.internal.ui.views.launch;
12
13
import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
14
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
15
import org.eclipse.debug.ui.IDebugUIConstants;
16
import org.eclipse.jface.action.Action;
17
import org.eclipse.ui.IWorkbenchPage;
18
import org.eclipse.ui.PlatformUI;
19
20
/**
21
 * Action that controls whether Debug actions are shown in Launch view.
22
 * 
23
 * @since 3.8
24
 */
25
class DebugToolBarAction extends Action {
26
27
	private final LaunchView fLaunchView;
28
	private final boolean fDebugViewToolbar;
29
    private final boolean fDebugToolbarActionSet;
30
31
	/**
32
	 * Creates a new action to set the debug view mode.
33
	 * 
34
	 * @param view Reference to the debug view.
35
	 * @param debugViewToolbar Causes action to show toolbar in Debug view.
36
	 * @param debugActionSet Causes action to show toolbar in top level Window 
37
	 * toolbar..
38
	 */
39
	public DebugToolBarAction(LaunchView view, boolean debugViewToolbar, boolean debugActionSet) {
40
		super(IInternalDebugCoreConstants.EMPTY_STRING, AS_RADIO_BUTTON);
41
		fLaunchView = view;
42
		fDebugViewToolbar = debugViewToolbar;
43
		fDebugToolbarActionSet = debugActionSet;
44
		
45
		if (fDebugViewToolbar && fDebugToolbarActionSet) {
46
            setText(LaunchViewMessages.DebugToolBarAction_Both_label);
47
            setToolTipText(LaunchViewMessages.DebugToolBarAction_Both_tooltip);  
48
            setDescription(LaunchViewMessages.DebugToolBarAction_Both_description);  
49
            PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_BOTH_ACTION);
50
		} else if (fDebugViewToolbar) {
51
            setText(LaunchViewMessages.DebugToolBarAction_View_label);
52
            setToolTipText(LaunchViewMessages.DebugToolBarAction_View_tooltip);  
53
            setDescription(LaunchViewMessages.DebugToolBarAction_View_description);  
54
			PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_VIEW_ACTION);
55
		} else if (fDebugToolbarActionSet) {
56
            setText(LaunchViewMessages.DebugToolBarAction_Window_label);
57
            setToolTipText(LaunchViewMessages.DebugToolBarAction_Window_tooltip);  
58
            setDescription(LaunchViewMessages.DebugToolBarAction_Window_description);  
59
			PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.DEBUG_TOOLBAR_WINDOW_ACTION);
60
		} 	
61
	}
62
63
	/* (non-Javadoc)
64
	 * @see org.eclipse.jface.action.IAction#run()
65
	 */
66
	public void run() {
67
		fLaunchView.setDebugToolbarInView(fDebugViewToolbar); 
68
69
		IWorkbenchPage page = fLaunchView.getSite().getPage(); 
70
        
71
		if (fDebugToolbarActionSet) {
72
            page.showActionSet(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET);
73
		} else {
74
            page.hideActionSet(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET);
75
		}
76
	}	
77
	
78
	/**
79
     * @return Returns whether debug toolbar is shown in view by this action.
80
	 */
81
	public boolean getDebugViewToolbar() {
82
	    return fDebugViewToolbar;
83
	}
84
85
    /**
86
     * @return Returns whether debug toolbar action set is shown by this action.
87
     */
88
    public boolean getDebugToolbarActionSet() {
89
        return fDebugToolbarActionSet;
90
    }
91
}
92
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java (-9 / +176 lines)
Lines 23-28 Link Here
23
import java.util.Iterator;
23
import java.util.Iterator;
24
import java.util.Map;
24
import java.util.Map;
25
import java.util.Set;
26
import java.util.TreeSet;
25
27
26
import org.eclipse.core.commands.IHandler2;
28
import org.eclipse.core.commands.IHandler2;
29
import org.eclipse.core.commands.contexts.ContextManagerEvent;
30
import org.eclipse.core.commands.contexts.IContextManagerListener;
27
import org.eclipse.core.runtime.IAdaptable;
31
import org.eclipse.core.runtime.IAdaptable;
28
import org.eclipse.core.runtime.IProgressMonitor;
32
import org.eclipse.core.runtime.IProgressMonitor;
Lines 68-71 Link Here
68
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
72
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
69
import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext;
73
import org.eclipse.debug.internal.ui.views.DebugModelPresentationContext;
74
import org.eclipse.debug.internal.ui.views.ViewContextService;
70
import org.eclipse.debug.ui.AbstractDebugView;
75
import org.eclipse.debug.ui.AbstractDebugView;
71
import org.eclipse.debug.ui.DebugUITools;
76
import org.eclipse.debug.ui.DebugUITools;
Lines 77-80 Link Here
77
import org.eclipse.debug.ui.contexts.IDebugContextListener;
82
import org.eclipse.debug.ui.contexts.IDebugContextListener;
78
import org.eclipse.debug.ui.contexts.IDebugContextProvider;
83
import org.eclipse.debug.ui.contexts.IDebugContextProvider;
84
import org.eclipse.jface.action.ActionContributionItem;
79
import org.eclipse.jface.action.GroupMarker;
85
import org.eclipse.jface.action.GroupMarker;
80
import org.eclipse.jface.action.IMenuListener;
86
import org.eclipse.jface.action.IMenuListener;
Lines 116-119 Link Here
116
import org.eclipse.ui.XMLMemento;
122
import org.eclipse.ui.XMLMemento;
117
import org.eclipse.ui.actions.SelectionListenerAction;
123
import org.eclipse.ui.actions.SelectionListenerAction;
124
import org.eclipse.ui.contexts.IContextService;
118
import org.eclipse.ui.dialogs.PropertyDialogAction;
125
import org.eclipse.ui.dialogs.PropertyDialogAction;
119
import org.eclipse.ui.part.IPageBookViewPage;
126
import org.eclipse.ui.part.IPageBookViewPage;
Lines 127-131 Link Here
127
import org.eclipse.ui.progress.UIJob;
134
import org.eclipse.ui.progress.UIJob;
128
135
129
public class LaunchView extends AbstractDebugView implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, IShowInTargetList, IPartListener2, IViewerUpdateListener {
136
public class LaunchView extends AbstractDebugView 
137
    implements ISelectionChangedListener, IPerspectiveListener2, IPageListener, IShowInTarget, IShowInSource, 
138
    IShowInTargetList, IPartListener2, IViewerUpdateListener, IContextManagerListener 
139
{
130
	
140
	
131
	public static final String ID_CONTEXT_ACTIVITY_BINDINGS = "contextActivityBindings"; //$NON-NLS-1$
141
	public static final String ID_CONTEXT_ACTIVITY_BINDINGS = "contextActivityBindings"; //$NON-NLS-1$
Lines 195-198 Link Here
195
205
196
    /**
206
    /**
207
     */
208
    private DebugToolBarAction[] fDebugToolBarActions;
209
    
210
    /**
197
     * Action that controls the breadcrumb drop-down auto-expand behavior.
211
     * Action that controls the breadcrumb drop-down auto-expand behavior.
198
     * 
212
     * 
Lines 200-203 Link Here
200
     */
214
     */
201
    private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction;
215
    private BreadcrumbDropDownAutoExpandAction fBreadcrumbDropDownAutoExpandAction;
216
    
217
    /**
218
     * Context service for this view.  Used to track whether debug toolbar
219
     * action set is active.
220
     * 
221
     * @since 3.8
222
     */
223
    private IContextService fContextService;
202
    
224
    
203
    /**
225
    /**
Lines 215-219 Link Here
215
     */
237
     */
216
    private static final String BREADCRUMB_DROPDOWN_AUTO_EXPAND = DebugUIPlugin.getUniqueIdentifier() + ".BREADCRUMB_DROPDOWN_AUTO_EXPAND"; //$NON-NLS-1$
238
    private static final String BREADCRUMB_DROPDOWN_AUTO_EXPAND = DebugUIPlugin.getUniqueIdentifier() + ".BREADCRUMB_DROPDOWN_AUTO_EXPAND"; //$NON-NLS-1$
217
    
239
218
    /**
240
    /**
219
     * Preference for whether the elements in breadcrumb's
241
     * Preference for whether the elements in breadcrumb's
Lines 230-233 Link Here
230
     */
252
     */
231
    private Map fHandlers = new HashMap();
253
    private Map fHandlers = new HashMap();
254
    
255
    private boolean fDebugToolbarInView = true;
256
    
257
    private Set fDebugToolbarHiddenPerspectives = new TreeSet();
232
    
258
    
233
	/**
259
	/**
Lines 605-608 Link Here
605
        }
631
        }
606
        
632
        
633
        createDebugToolBarInViewActions(parent);
634
        
607
        // Add a resize listener for the view to activate breadcrumb as needed. 
635
        // Add a resize listener for the view to activate breadcrumb as needed. 
608
        parent.addControlListener(new ControlListener() {
636
        parent.addControlListener(new ControlListener() {
Lines 618-621 Link Here
618
            }
646
            }
619
        });
647
        });
648
        
649
        fContextService.addContextManagerListener(this);        
620
	}
650
	}
621
651
Lines 706-710 Link Here
706
        modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction);
736
        modeSubmenu.add(fBreadcrumbDropDownAutoExpandAction);
707
        viewMenu.add(modeSubmenu);
737
        viewMenu.add(modeSubmenu);
708
        viewMenu.add(new Separator());
709
        
738
        
710
        modeSubmenu.addMenuListener(new IMenuListener() {
739
        modeSubmenu.addMenuListener(new IMenuListener() {
Lines 717-724 Link Here
717
           }
746
           }
718
        });
747
        });
719
        
720
    }
748
    }
721
749
722
 
750
    /**
751
     * Creates actions for controlling view mode.
752
     * 
753
     * @param parent The view's parent control used to calculate view size
754
     * in auto mode.
755
     */
756
    private void createDebugToolBarInViewActions(final Composite parent) {
757
        IActionBars actionBars = getViewSite().getActionBars();
758
        IMenuManager viewMenu = actionBars.getMenuManager();
759
        
760
        fDebugToolBarActions = new DebugToolBarAction[3];
761
        fDebugToolBarActions[0] = new DebugToolBarAction(this, true, false);
762
        fDebugToolBarActions[1] = new DebugToolBarAction(this, false, true);
763
        fDebugToolBarActions[2] = new DebugToolBarAction(this, true, true);
764
        
765
        final MenuManager modeSubmenu = new MenuManager(LaunchViewMessages.LaunchView_ToolBarMenu_label);
766
        modeSubmenu.setRemoveAllWhenShown(true);
767
        modeSubmenu.add(fDebugToolBarActions[0]);
768
        modeSubmenu.add(fDebugToolBarActions[1]);
769
        modeSubmenu.add(fDebugToolBarActions[2]);
770
        viewMenu.add(modeSubmenu);
771
        
772
        modeSubmenu.addMenuListener(new IMenuListener() {
773
            public void menuAboutToShow(IMenuManager manager) {
774
                modeSubmenu.add(fDebugToolBarActions[0]);
775
                modeSubmenu.add(fDebugToolBarActions[1]);
776
                modeSubmenu.add(fDebugToolBarActions[2]);
777
           }
778
        });
779
        
780
        updateCheckedDebugToolBarAction();
781
    }
782
783
    
723
    /**
784
    /**
724
     * Sets the current view mode.  If needed, the active view page is changed. 
785
     * Sets the current view mode.  If needed, the active view page is changed. 
Lines 859-862 Link Here
859
            } 
920
            } 
860
        }
921
        }
922
923
        String preference = DebugUIPlugin.getDefault().getPreferenceStore().getString(
924
            IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES);
925
        if (preference != null) {
926
            fDebugToolbarHiddenPerspectives = ViewContextService.parseList(preference);
927
        }
928
        IPerspectiveDescriptor perspective = getSite().getPage().getPerspective();
929
        fDebugToolbarInView = perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId());
861
	}
930
	}
862
	
931
	
Lines 868-871 Link Here
868
		commonInit(site);
937
		commonInit(site);
869
		preferenceInit(site);
938
		preferenceInit(site);
939
		fContextService = (IContextService)site.getService(IContextService.class);
870
	}
940
	}
871
941
Lines 877-880 Link Here
877
		commonInit(site);
947
		commonInit(site);
878
        preferenceInit(site);
948
        preferenceInit(site);
949
        fContextService = (IContextService)site.getService(IContextService.class);
879
	}
950
	}
880
951
Lines 905-908 Link Here
905
            }
976
            }
906
        }
977
        }
978
        
979
        StringBuffer buffer= new StringBuffer();
980
        for (Iterator itr = fDebugToolbarHiddenPerspectives.iterator(); itr.hasNext();) {
981
            buffer.append(itr.next()).append(',');          
982
        } 
983
        getPreferenceStore().setValue(IDebugPreferenceConstants.DEBUG_VIEW_TOOLBAR_HIDDEN_PERSPECTIVES, buffer.toString());
984
907
        super.partDeactivated(part);
985
        super.partDeactivated(part);
908
    }
986
    }
Lines 927-931 Link Here
927
		tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP));
1005
		tbm.add(new GroupMarker(IDebugUIConstants.EMPTY_STEP_GROUP));
928
		tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP));
1006
		tbm.add(new Separator(IDebugUIConstants.RENDER_GROUP));
929
        
1007
1008
		if (fDebugToolbarInView) {
1009
		    addDebugToolbarActions(tbm);
1010
		}
1011
	}	
1012
1013
   protected void addDebugToolbarActions(IToolBarManager tbm) {
930
        tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESUME));
1014
        tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(RESUME));
931
        tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND));
1015
        tbm.appendToGroup(IDebugUIConstants.THREAD_GROUP, getAction(SUSPEND));
Lines 936-949 Link Here
936
        tbm.appendToGroup(IDebugUIConstants.STEP_OVER_GROUP, getAction(STEP_OVER));
1020
        tbm.appendToGroup(IDebugUIConstants.STEP_OVER_GROUP, getAction(STEP_OVER));
937
        tbm.appendToGroup(IDebugUIConstants.STEP_RETURN_GROUP, getAction(STEP_RETURN));
1021
        tbm.appendToGroup(IDebugUIConstants.STEP_RETURN_GROUP, getAction(STEP_RETURN));
938
        
1022
939
        tbm.appendToGroup(IDebugUIConstants.EMPTY_STEP_GROUP, getAction(DROP_TO_FRAME));
1023
        tbm.appendToGroup(IDebugUIConstants.EMPTY_STEP_GROUP, getAction(DROP_TO_FRAME));
940
        
1024
        
941
        tbm.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS));
1025
        tbm.appendToGroup(IDebugUIConstants.RENDER_GROUP, getAction(TOGGLE_STEP_FILTERS));
942
	}	
1026
   }   
943
1027
	
1028
   /**
1029
    * Removes the toolbar actions contributed by this view from the toolbar 
1030
    * manager.
1031
    * @param tbm
1032
    */
1033
   protected void removeDebugToolbarActions(IToolBarManager tbm) {
1034
       tbm.remove(new ActionContributionItem(getAction(RESUME)));
1035
       tbm.remove(new ActionContributionItem(getAction(SUSPEND)));
1036
       tbm.remove(new ActionContributionItem(getAction(TERMINATE)));
1037
       tbm.remove(new ActionContributionItem(getAction(DISCONNECT)));
1038
       
1039
       tbm.remove(new ActionContributionItem(getAction(STEP_INTO)));
1040
       tbm.remove(new ActionContributionItem(getAction(STEP_OVER)));
1041
       tbm.remove(new ActionContributionItem(getAction(STEP_RETURN)));
1042
       
1043
       tbm.remove(new ActionContributionItem(getAction(DROP_TO_FRAME)));
1044
       
1045
       tbm.remove(new ActionContributionItem(getAction(TOGGLE_STEP_FILTERS)));
1046
   }
1047
	   
1048
   public boolean isDebugToolbarInView() {
1049
       return fDebugToolbarInView;
1050
   }
1051
   
1052
   public boolean isDebugToolbarInViewInPerspective(IPerspectiveDescriptor perspective) {
1053
       return perspective == null || !fDebugToolbarHiddenPerspectives.contains(perspective.getId());
1054
   }
1055
   
1056
   public void setDebugToolbarInView(boolean show) {
1057
       if (show == isDebugToolbarInView()) {
1058
           return;
1059
       }
1060
       fDebugToolbarInView = show;
1061
       
1062
       // Update the perspectives set.
1063
       IPerspectiveDescriptor perspective = getSite().getPage().getPerspective();
1064
       if (perspective != null) {
1065
           if (show) {
1066
               fDebugToolbarHiddenPerspectives.remove(perspective.getId());
1067
           } else {
1068
               fDebugToolbarHiddenPerspectives.add(perspective.getId());
1069
           }
1070
       }
1071
       
1072
       // Update the toolbar manager.
1073
       IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
1074
       if (show) {
1075
           addDebugToolbarActions(tbm);
1076
       } else {
1077
           removeDebugToolbarActions(tbm);
1078
       }
1079
       getViewSite().getActionBars().updateActionBars();
1080
       
1081
       // Update system property used by contributed actions.
1082
       System.setProperty(IDebugUIConstants.DEBUG_VIEW_TOOBAR_VISIBLE, Boolean.toString(show));
1083
   }
1084
   
1085
   
944
	/* (non-Javadoc)
1086
	/* (non-Javadoc)
945
	 * @see org.eclipse.ui.IWorkbenchPart#dispose()
1087
	 * @see org.eclipse.ui.IWorkbenchPart#dispose()
946
	 */
1088
	 */
947
	public void dispose() {
1089
	public void dispose() {
1090
	    fContextService.removeContextManagerListener(this);
948
	    getSite().getSelectionProvider().removeSelectionChangedListener(this);
1091
	    getSite().getSelectionProvider().removeSelectionChangedListener(this);
949
		DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextProvider(fContextProviderProxy);
1092
		DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()).removeDebugContextProvider(fContextProviderProxy);
Lines 1025-1028 Link Here
1025
		setActive(page.findView(getSite().getId()) != null);
1168
		setActive(page.findView(getSite().getId()) != null);
1026
		updateObjects();
1169
		updateObjects();
1170
		setDebugToolbarInView( isDebugToolbarInViewInPerspective(getSite().getPage().getPerspective()) );
1171
        updateCheckedDebugToolBarAction();
1027
	}
1172
	}
1028
1173
Lines 1126-1129 Link Here
1126
    }
1271
    }
1127
	
1272
	
1273
	public void contextManagerChanged(ContextManagerEvent event) {
1274
	    if (event.isActiveContextsChanged()) {
1275
	        Set oldContexts = event.getPreviouslyActiveContextIds();
1276
	        Set newContexts = event.getContextManager().getActiveContextIds();
1277
	        if (oldContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET) != 
1278
	            newContexts.contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET)) 
1279
	        {
1280
	            updateCheckedDebugToolBarAction();
1281
	        }
1282
	    }
1283
	}
1284
	
1285
	private void updateCheckedDebugToolBarAction() {
1286
	    boolean debugToolBarInView = isDebugToolbarInView();
1287
        boolean toolbarActionSetActive = fContextService.getActiveContextIds().contains(IDebugUIConstants.DEBUG_TOOLBAR_ACTION_SET); 
1288
        for (int i = 0; i < fDebugToolBarActions.length; i++) {
1289
            fDebugToolBarActions[i].setChecked(
1290
                fDebugToolBarActions[i].getDebugViewToolbar() == debugToolBarInView &&
1291
                fDebugToolBarActions[i].getDebugToolbarActionSet() == toolbarActionSetActive);
1292
        }
1293
	}
1294
	
1128
	/**
1295
	/**
1129
	 * Updates the enabled state of the given action based on the selection
1296
	 * Updates the enabled state of the given action based on the selection
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.java (-1 / +12 lines)
Lines 1-4 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
Lines 33-36 Link Here
33
    public static String BreadcrumbDropDownAutoExpandAction_description;
33
    public static String BreadcrumbDropDownAutoExpandAction_description;
34
34
35
    public static String LaunchView_ToolBarMenu_label;
36
    public static String DebugToolBarAction_View_label;
37
    public static String DebugToolBarAction_View_tooltip;
38
    public static String DebugToolBarAction_View_description;
39
    public static String DebugToolBarAction_Window_label;
40
    public static String DebugToolBarAction_Window_tooltip;
41
    public static String DebugToolBarAction_Window_description;
42
    public static String DebugToolBarAction_Both_label;
43
    public static String DebugToolBarAction_Both_tooltip;
44
    public static String DebugToolBarAction_Both_description;
45
35
	static {
46
	static {
36
		// load message values from bundle file
47
		// load message values from bundle file
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchViewMessages.properties (-1 / +13 lines)
Lines 1-4 Link Here
1
###############################################################################
1
###############################################################################
2
# Copyright (c) 2000, 2009 IBM Corporation and others.
2
# Copyright (c) 2000, 2011 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
4
# are made available under the terms of the Eclipse Public License v1.0
Lines 26-27 Link Here
26
BreadcrumbDropDownAutoExpandAction_tooltip=Auto-Expand Breadcrumb
26
BreadcrumbDropDownAutoExpandAction_tooltip=Auto-Expand Breadcrumb
27
BreadcrumbDropDownAutoExpandAction_description=In the breadcrumb drop-down, automatically expand elements to reveal full selection in view.
27
BreadcrumbDropDownAutoExpandAction_description=In the breadcrumb drop-down, automatically expand elements to reveal full selection in view.
28
29
LaunchView_ToolBarMenu_label=&Debug Toolbar
30
DebugToolBarAction_View_label=&Debug View
31
DebugToolBarAction_View_tooltip=Debug View
32
DebugToolBarAction_View_description=Show debug actions in Debug view toolbar
33
DebugToolBarAction_Window_label=&Main Toolbar
34
DebugToolBarAction_Window_tooltip=Main Toolbar
35
DebugToolBarAction_Window_description=Show debug action in the Window's main toolbar
36
DebugToolBarAction_Both_label=&Both
37
DebugToolBarAction_Both_tooltip=Both
38
DebugToolBarAction_Both_description=Show debug actions in both toolbars
39
(-)a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java (-1 / +17 lines)
Lines 613-617 Link Here
613
	public static final String DEBUG_ACTION_SET= PLUGIN_ID + ".debugActionSet"; //$NON-NLS-1$
613
	public static final String DEBUG_ACTION_SET= PLUGIN_ID + ".debugActionSet"; //$NON-NLS-1$
614
614
615
	
615
    /**
616
     * Debug Toolbar action set identifier (value <code>"org.eclipse.debug.ui.debugToolbarActionSet"</code>).
617
     * 
618
     * @since 3.8
619
     */
620
    public static final String DEBUG_TOOLBAR_ACTION_SET= PLUGIN_ID + ".debugToolbarActionSet"; //$NON-NLS-1$
621
622
    /**
623
     * System property which indicates whether the common debugging actions 
624
     * should be shown in the Debug view, as opposed to the top level 
625
     * toolbar.  Actions contributing to the debug view can use this property
626
     * to control their visibility.
627
     * 
628
     * @since 3.8
629
     */
630
    public static final String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$NON-NLS-1$
631
        
616
	/**
632
	/**
617
	 * Launch action set identifier (value <code>"org.eclipse.debug.ui.launchActionSet"</code>).
633
	 * Launch action set identifier (value <code>"org.eclipse.debug.ui.launchActionSet"</code>).

Return to bug 258767