org.eclipse.debug.ui.contexts.DebugContextEvent Java Examples

The following examples show how to use org.eclipse.debug.ui.contexts.DebugContextEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScriptEvaluationContextManager.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
public void debugContextChanged( DebugContextEvent event )
{
	ISelection selection = event.getContext( );
	if ( selection instanceof IStructuredSelection )
	{
		IStructuredSelection ss = (IStructuredSelection) selection;
		if ( ss.size( ) == 1 )
		{
			Object element = ss.getFirstElement( );
			if ( element instanceof IAdaptable )
			{
				ScriptDebugElement frame = (ScriptDebugElement) ( (IAdaptable) element ).getAdapter( ScriptDebugElement.class );

				if ( frame != null )
				{
					System.setProperty( KEY, "true" ); //$NON-NLS-1$
					return;
				}
			}
		}
	}
	System.setProperty(KEY, "false" ); //$NON-NLS-1$
}
 
Example #2
Source File: AbstractDebugVariableCodeMiningProvider.java    From jdt-codemining with Eclipse Public License 1.0 5 votes vote down vote up
private synchronized void addSynchronizedDebugListener(ITextViewer viewer) {
	if (fContextListener != null) {
		return;
	}
	// When debug context changed, debug variable minings of the current stack frame
	// must be updated.
	fContextListener = event -> {
		if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0 && viewer != null) {
			((ISourceViewerExtension5) viewer).updateCodeMinings();
		}
	};
	DebugUITools.addPartDebugContextListener(getSite(), fContextListener);
}
 
Example #3
Source File: HighlightingSubmachineDecorationProvider.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
public void debugContextChanged(DebugContextEvent event) {
	if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
		PlatformObject object = (PlatformObject) ((IStructuredSelection) event.getContext()).getFirstElement();
		if (object == null)
			return;
		IDebugTarget newTarget = (IDebugTarget) object.getAdapter(IDebugTarget.class);
		if (newTarget != debugTarget && newTarget != null && !newTarget.isTerminated()) {
			debugTarget = newTarget;
		}
	}
}
 
Example #4
Source File: ConsoleActivateDebugContext.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void debugContextChanged(DebugContextEvent event) {
    if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
        if (view != null && getProcess() != null && getProcess().equals(DebugUITools.getCurrentProcess())) {
            view.display(console);
        }
    }

}
 
Example #5
Source File: SimulationView.java    From statecharts with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void debugContextChanged(DebugContextEvent event) {
}
 
Example #6
Source File: AnyPyStackFrameSelected.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void debugContextChanged(DebugContextEvent event) {
    if (event.getFlags() == DebugContextEvent.ACTIVATED) {
        updateContext(getDebugContextElementForSelection(event.getContext()));
    }
}
 
Example #7
Source File: RetargetSetNextAction.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void debugContextChanged(DebugContextEvent event) {
    contextActivated(event.getContext());
}