本文整理汇总了Java中org.eclipse.debug.ui.contexts.DebugContextEvent类的典型用法代码示例。如果您正苦于以下问题:Java DebugContextEvent类的具体用法?Java DebugContextEvent怎么用?Java DebugContextEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DebugContextEvent类属于org.eclipse.debug.ui.contexts包,在下文中一共展示了DebugContextEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
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$
}
示例2: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
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;
}
}
}
示例3: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
@Override
public void debugContextChanged(DebugContextEvent event) {
if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
if (view != null && getProcess() != null && getProcess().equals(DebugUITools.getCurrentProcess())) {
view.display(console);
}
}
}
示例4: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
@Override
public void debugContextChanged(DebugContextEvent event) {
super.debugContextChanged(event);
if (debugTarget != null)
this.sessionDropdown.setSelection(new StructuredSelection(debugTarget));
}
示例5: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
@Override
public void debugContextChanged(DebugContextEvent event) {
if (event.getFlags() == DebugContextEvent.ACTIVATED) {
updateContext(getDebugContextElementForSelection(event.getContext()));
}
}
示例6: debugContextChanged
import org.eclipse.debug.ui.contexts.DebugContextEvent; //导入依赖的package包/类
@Override
public void debugContextChanged(DebugContextEvent event) {
contextActivated(event.getContext());
}