Switching between debugger and inferrior
consoles.
Index:
DebuggerConsoleActionDelegate.java
===================================================================
RCS
file:
/home/tools/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DebuggerConsoleActionDelegate.java,v
retrieving
revision 1.1
diff -u -r1.1 DebuggerConsoleActionDelegate.java
---
DebuggerConsoleActionDelegate.java 23 Oct 2002 19:01:55
-0000 1.1
+++ DebuggerConsoleActionDelegate.java 23 Oct 2002
21:17:34 -0000
@@ -7,10 +7,14 @@
import
org.eclipse.cdt.debug.core.IDebuggerProcessSupport;
import
org.eclipse.cdt.debug.internal.core.model.CDebugElement;
+import
org.eclipse.debug.core.DebugEvent;
import
org.eclipse.debug.core.DebugException;
+import
org.eclipse.debug.ui.AbstractDebugView;
import
org.eclipse.jface.action.IAction;
import
org.eclipse.jface.viewers.ISelection;
import
org.eclipse.jface.viewers.IStructuredSelection;
+import
org.eclipse.jface.viewers.Viewer;
+import
org.eclipse.ui.IViewPart;
/**
* Enter type
comment.
@@ -19,6 +23,8 @@
*/
public class
DebuggerConsoleActionDelegate extends
AbstractListenerActionDelegate
{
+ private IViewPart fViewPart
= null;
+
/* (non-Javadoc)
* @see
org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(Object)
*/
@@ -30,6 +36,20 @@
if ( dps != null &&
dps.supportsDebuggerProcess()
)
{
dps.setDebuggerProcessDefault(
!dps.isDebuggerProcessDefault()
);
+ ((CDebugElement)element).fireChangeEvent(
DebugEvent.CLIENT_REQUEST );
+ if ( fViewPart != null
&& fViewPart instanceof AbstractDebugView
)
+ {
+ final
AbstractDebugView view =
(AbstractDebugView)fViewPart;
+ fViewPart.getViewSite().getShell().getDisplay().asyncExec(
+ new
Runnable()
+ {
+ public
void
run()
+ {
+ Viewer
viewer =
view.getViewer();
+ viewer.setSelection(
viewer.getSelection()
);
+ }
+ }
);
+ }
}
}
}
@@ -72,5 +92,14
@@
}
}
action.setChecked(
checked );
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.ui.IViewActionDelegate#init(IViewPart)
+
*/
+ public void init( IViewPart view
)
+ {
+ super.init( view );
+ fViewPart =
view;
}Index:
ChangeLog
===================================================================
RCS
file: /home/tools/org.eclipse.cdt.debug.ui/ChangeLog,v
retrieving revision
1.12
diff -u -r1.12 ChangeLog
--- ChangeLog 23 Oct 2002 19:01:55
-0000 1.12
+++ ChangeLog 23 Oct 2002 21:17:59 -0000
@@ -1,4 +1,7
@@
2002-10-23 Mikhail Khodjaiants
+ *
DebuggerConsoleActionDelegate.java: The debugger/inferrior console should become
visible when checking "Show Debug Console".
+
+2002-10-23 Mikhail
Khodjaiants
"Show Debugger Console" action.
Action
images:
debugger_console.gif (clcl, dlcl,
elcl);
}