"Show Debugger Console" action.
Index:
DebuggerConsoleActionDelegate.java
===================================================================
RCS
file: DebuggerConsoleActionDelegate.java
diff -N
DebuggerConsoleActionDelegate.java
--- /dev/null 1 Jan 1970 00:00:00
-0000
+++ DebuggerConsoleActionDelegate.java 23 Oct 2002 18:57:54
-0000
@@ -0,0 +1,76 @@
+/*
+ *(c) Copyright QNX Software Systems Ltd.
2002.
+ * All Rights Reserved.
+ *
+ */
+package
org.eclipse.cdt.debug.internal.ui.actions;
+
+import
org.eclipse.cdt.debug.core.IDebuggerProcessSupport;
+import
org.eclipse.cdt.debug.internal.core.model.CDebugElement;
+import
org.eclipse.debug.core.DebugException;
+import
org.eclipse.jface.action.IAction;
+import
org.eclipse.jface.viewers.ISelection;
+import
org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ * Enter type
comment.
+ *
+ * @since: Oct 23, 2002
+ */
+public class
DebuggerConsoleActionDelegate extends
AbstractListenerActionDelegate
+{
+ /* (non-Javadoc)
+ *
@see
org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(Object)
+
*/
+ protected void doAction( Object element ) throws
DebugException
+ {
+ if ( element != null &&
element instanceof CDebugElement
)
+ {
+ IDebuggerProcessSupport dps =
(IDebuggerProcessSupport)((CDebugElement)element).getDebugTarget().getAdapter(
IDebuggerProcessSupport.class );
+ if ( dps != null
&& dps.supportsDebuggerProcess()
)
+ {
+ dps.setDebuggerProcessDefault(
!dps.isDebuggerProcessDefault() );
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#isEnabledFor(Object)
+
*/
+ protected boolean isEnabledFor( Object element
)
+ {
+ if ( element != null && element instanceof
CDebugElement )
+ {
+ IDebuggerProcessSupport
dps =
(IDebuggerProcessSupport)((CDebugElement)element).getDebugTarget().getAdapter(
IDebuggerProcessSupport.class );
+ return ( dps != null
&& dps.supportsDebuggerProcess() );
+ }
+ return false;
+ }
+
+ /*
(non-Javadoc)
+ * @see
org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#enableForMultiSelection()
+
*/
+ protected boolean
enableForMultiSelection()
+ {
+ return
false;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
+
*/
+ public void selectionChanged( IAction action, ISelection selection
)
+ {
+ super.selectionChanged(action,
selection);
+ boolean checked = false;
+ if (
selection != null && selection instanceof IStructuredSelection
)
+ {
+ Object element =
((IStructuredSelection)selection).getFirstElement();
+ if (
element != null && element instanceof CDebugElement
)
+ {
+ IDebuggerProcessSupport
dps =
(IDebuggerProcessSupport)((CDebugElement)element).getDebugTarget().getAdapter(
IDebuggerProcessSupport.class );
+ checked = ( dps !=
null && dps.supportsDebuggerProcess() ) ? dps.isDebuggerProcessDefault()
: false;
+ }
+ }
+ action.setChecked(
checked );
+ }
+}Index:
debugger_console.gif
===================================================================
RCS
file: debugger_console.gif
diff -N debugger_console.gif
Binary files
/dev/null and debugger_console.gif differ
Index:
debugger_console.gif
===================================================================
RCS
file: debugger_console.gif
diff -N debugger_console.gif
Binary files
/dev/null and debugger_console.gif differ
Index:
debugger_console.gif
===================================================================
RCS
file: debugger_console.gif
diff -N debugger_console.gif
Binary files
/dev/null and debugger_console.gif differ
Index:
ChangeLog
===================================================================
RCS
file: /home/tools/org.eclipse.cdt.debug.ui/ChangeLog,v
retrieving revision
1.11
diff -u -r1.11 ChangeLog
--- ChangeLog 22 Oct 2002 17:10:49
-0000 1.11
+++ ChangeLog 23 Oct 2002 18:59:36 -0000
@@ -1,3
+1,11 @@
+2002-10-23 Mikhail Khodjaiants
+ "Show Debugger Console"
action.
+ Action images:
+ debugger_console.gif (clcl,
dlcl, elcl);
+ * DebuggerConsoleActionDelegate.java: implementation of
action delegate.
+ * plugin.xml: action extenions
+ *
plugin.properties: action label and tooltip text.
+
2002-10-22
Mikhail Khodjaiants
Implementation of the "Show ASCII"
action.
Action images:
Index:
plugin.properties
===================================================================
RCS
file: /home/tools/org.eclipse.cdt.debug.ui/plugin.properties,v
retrieving
revision 1.20
diff -u -r1.20 plugin.properties
---
plugin.properties 11 Oct 2002 21:50:04 -0000 1.20
+++
plugin.properties 23 Oct 2002 19:00:08 -0000
@@ -23,6 +23,9
@@
SwitchToDisassemblyAction.label=Disassembly
Mode
SwitchToDisassemblyAction.tooltip=Disassembly Mode
On/Off
+ShowDebuggerConsoleAction.label=Show Debugger
Console
+ShowDebuggerConsoleAction.tooltip=Show Debugger Console On Target
Selection
+
AddBreakpoint.label=Add/Remove
&Breakpoint
EnableBreakpoint.label=T&oggle
Breakpoint
BreakpointProperties.label=Breakpoint
P&roperties...
Index:
plugin.xml
===================================================================
RCS
file: /home/tools/org.eclipse.cdt.debug.ui/plugin.xml,v
retrieving revision
1.29
diff -u -r1.29 plugin.xml
--- plugin.xml 11 Oct 2002 21:50:04
-0000 1.29
+++ plugin.xml 23 Oct 2002 19:00:22 -0000
@@ -237,6
+237,21
@@
</pluginState>
</enablement>
</action>
+
<action
+
class="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate"
+
enablesFor="1"
+
label="%ShowDebuggerConsoleAction.label"
+
menubarPath="renderGroup"
+
helpContextId="show_debugger_console_action_context"
+
icon="icons/full/clcl16/debugger_console.gif"
+
id="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate">
+
<enablement>
+
<pluginState
+
value="activated"
+
id="org.eclipse.cdt.debug.ui">
+
</pluginState>
+
</enablement>
+
</action>
</viewerContribution>
<viewerContribution
targetID="#CEditorRulerContext"
@@ -355,14 +370,14
@@
tooltip="%RestartAction.tooltip">
</action>
<action
-
label="%ShowFullPathsAction.label"
-
toolbarPath="renderGroup"
id="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
-
disabledIcon="icons/full/dlcl16/show_paths.gif"
+
toolbarPath="renderGroup"
hoverIcon="icons/full/clcl16/show_paths.gif"
class="org.eclipse.cdt.debug.internal.ui.actions.ShowFullPathsAction"
+
disabledIcon="icons/full/dlcl16/show_paths.gif"
icon="icons/full/elcl16/show_parents.gif"
helpContextId="show_full_paths_action_context"
+
label="%ShowFullPathsAction.label"
tooltip="%ShowFullPathsAction.tooltip">
</action>
<action
@@ -377,6 +392,18
@@
label="%SwitchToDisassemblyAction.label"
tooltip="%SwitchToDisassemblyAction.tooltip">
</action>
+
<action
+
toolbarPath="renderGroup"
+
id="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate"
+
hoverIcon="icons/full/clcl16/debugger_console.gif"
+
class="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate"
+
disabledIcon="icons/full/dlcl16/debugger_console.gif"
+
enablesFor="1"
+
icon="icons/full/elcl16/debugger_console.gif"
+
helpContextId="show_debugger_console_action_context"
+
label="%ShowDebuggerConsoleAction.label"
+
tooltip="%ShowDebuggerConsoleAction.tooltip">
+
</action>
</viewContribution>
<viewContribution
targetID="org.eclipse.debug.ui.BreakpointView"
@@ -459,6 +486,9
@@
</action>
<action
id="org.eclipse.cdt.debug.internal.ui.actions.SwitchToDisassemblyActionDelegate">
+
</action>
+
<action
+
id="org.eclipse.cdt.debug.internal.ui.actions.DebuggerConsoleActionDelegate">
</action>
</debugActionGroup>
</extension>