mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Switching between debugger and inferrior consoles.
This commit is contained in:
parent
5e682b2d5e
commit
dc089a66ed
2 changed files with 32 additions and 0 deletions
|
@ -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
|
2002-10-23 Mikhail Khodjaiants
|
||||||
"Show Debugger Console" action.
|
"Show Debugger Console" action.
|
||||||
Action images:
|
Action images:
|
||||||
|
|
|
@ -7,10 +7,14 @@ package org.eclipse.cdt.debug.internal.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.IDebuggerProcessSupport;
|
import org.eclipse.cdt.debug.core.IDebuggerProcessSupport;
|
||||||
import org.eclipse.cdt.debug.internal.core.model.CDebugElement;
|
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.core.DebugException;
|
||||||
|
import org.eclipse.debug.ui.AbstractDebugView;
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.jface.viewers.ISelection;
|
import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
|
import org.eclipse.ui.IViewPart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter type comment.
|
* Enter type comment.
|
||||||
|
@ -19,6 +23,8 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
*/
|
*/
|
||||||
public class DebuggerConsoleActionDelegate extends AbstractListenerActionDelegate
|
public class DebuggerConsoleActionDelegate extends AbstractListenerActionDelegate
|
||||||
{
|
{
|
||||||
|
private IViewPart fViewPart = null;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(Object)
|
* @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() )
|
if ( dps != null && dps.supportsDebuggerProcess() )
|
||||||
{
|
{
|
||||||
dps.setDebuggerProcessDefault( !dps.isDebuggerProcessDefault() );
|
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 );
|
action.setChecked( checked );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.IViewActionDelegate#init(IViewPart)
|
||||||
|
*/
|
||||||
|
public void init( IViewPart view )
|
||||||
|
{
|
||||||
|
super.init( view );
|
||||||
|
fViewPart = view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue