1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Switching between debugger and inferrior consoles.

This commit is contained in:
Mikhail Khodjaiants 2002-10-23 21:19:19 +00:00
parent 5e682b2d5e
commit dc089a66ed
2 changed files with 32 additions and 0 deletions

View file

@ -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:

View file

@ -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;
}
}