diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 4e289f91623..d42a442b773 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,6 @@ +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: diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DebuggerConsoleActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DebuggerConsoleActionDelegate.java index 03777c4b7ef..4fe5d6f2356 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DebuggerConsoleActionDelegate.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/DebuggerConsoleActionDelegate.java @@ -7,10 +7,14 @@ 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.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 @@ import org.eclipse.jface.viewers.IStructuredSelection; */ 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 @@ public class DebuggerConsoleActionDelegate extends AbstractListenerActionDelegat 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() ); + } + } ); + } } } } @@ -73,4 +93,13 @@ public class DebuggerConsoleActionDelegate extends AbstractListenerActionDelegat } action.setChecked( checked ); } + + /* (non-Javadoc) + * @see org.eclipse.ui.IViewActionDelegate#init(IViewPart) + */ + public void init( IViewPart view ) + { + super.init( view ); + fViewPart = view; + } }