本文整理汇总了Java中org.eclipse.debug.core.model.IDebugTarget.isTerminated方法的典型用法代码示例。如果您正苦于以下问题:Java IDebugTarget.isTerminated方法的具体用法?Java IDebugTarget.isTerminated怎么用?Java IDebugTarget.isTerminated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.model.IDebugTarget
的用法示例。
在下文中一共展示了IDebugTarget.isTerminated方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PyDebugTargetServer
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
public PyDebugTargetServer(ILaunch launch, IPath[] file, RemoteDebuggerServer debugger) {
this.file = file;
this.debugger = debugger;
this.threads = new PyThread[0];
this.launch = launch;
if (launch != null) {
for (IDebugTarget target : launch.getDebugTargets()) {
if (target instanceof PyDebugTargetServer && target.isTerminated()) {
launch.removeDebugTarget(target);
}
}
launch.addDebugTarget(this);
}
debugger.addTarget(this);
PyExceptionBreakPointManager.getInstance().addListener(this);
PyPropertyTraceManager.getInstance().addListener(this);
IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
breakpointManager.addBreakpointListener(this);
// we have to know when we get removed, so that we can shut off the debugger
DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this);
}
示例2: getText
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
@Override
public String getText(Object element) {
if (element instanceof IDebugTarget) {
try {
IDebugTarget target = (IDebugTarget) element;
String text = target.getName();
return target.isTerminated() ? Messages.getString("target.terminated", text) : text;
} catch (DebugException ex) {
logger.log(Level.FINE, "Unexpected execption", ex);
/* FALLTHROUGH */
}
}
return super.getText(element);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:15,代码来源:CloudSdkDebugTargetPresentation.java
示例3: isTerminated
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
@Override
public boolean isTerminated() {
for (IProcess p : processes) {
if (!p.isTerminated()) {
return false;
}
}
for (IDebugTarget t : targets) {
if (!t.isTerminated()) {
return false;
}
}
return true;
}
示例4: getDebugTarget
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
protected Object getDebugTarget() {
IDebugTarget[] debugTargets = DebugPlugin.getDefault().getLaunchManager().getDebugTargets();
for (IDebugTarget iDebugTarget : debugTargets) {
if (iDebugTarget.isTerminated())
continue;
if (iDebugTarget.getAdapter(ISimulationEngine.class) == this)
return iDebugTarget;
}
return null;
}
示例5: allTargetsTerminated
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
protected boolean allTargetsTerminated() {
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (ILaunch launch : launches) {
for (IDebugTarget target : launch.getDebugTargets()) {
if (!target.isTerminated())
return false;
}
}
return true;
}
示例6: setActiveSession
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
protected void setActiveSession() {
// if a simulation session is running, we should initialize with its
// content
IAdaptable debugContext = DebugUITools.getDebugContext();
if (debugContext != null) {
IDebugTarget debugTarget = (IDebugTarget) debugContext.getAdapter(IDebugTarget.class);
if (debugTarget != null) {
if (!debugTarget.isTerminated()) {
this.debugTarget = (IDebugTarget) debugTarget;
activeTargetChanged(this.debugTarget);
}
}
}
}
示例7: changeTarget
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
protected void changeTarget(IDebugTarget newTarget) {
if (newTarget == debugTarget) {
return;
}
if (newTarget != debugTarget && newTarget != null && !newTarget.isTerminated()) {
debugTarget = newTarget;
activeTargetChanged(newTarget);
} else {
setActiveSession();
}
}
示例8: debugContextChanged
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的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;
}
}
}
示例9: createSessionSelectorComponent
import org.eclipse.debug.core.model.IDebugTarget; //导入方法依赖的package包/类
protected ComboViewer createSessionSelectorComponent(Composite top) {
Combo combo = new Combo(top, SWT.DROP_DOWN | SWT.READ_ONLY);
combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
this.sessionDropdown = new ComboViewer(combo);
this.sessionDropdown.setContentProvider(new ArrayContentProvider());
this.sessionDropdown.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
IDebugTarget target = ((IDebugTarget) element);
boolean isTerminated = target.isTerminated();
boolean isSuspended = target.isSuspended();
if (target.getLaunch().getDebugTarget() != null)
try {
return target.getLaunch().getDebugTarget().getName() + " ["
+ (isTerminated ? "terminated" : isSuspended ? "suspended" : "active") + "]";
} catch (DebugException e) {
return "unkown state";
}
else
return "No simulation running";
}
});
this.sessionDropdown.addPostSelectionChangedListener(new SessionSelectionChangedListener());
targets.clear();
for (ILaunch iLaunch : DebugPlugin.getDefault().getLaunchManager().getLaunches()) {
for (IDebugTarget iDebugTarget : iLaunch.getDebugTargets()) {
if (!iDebugTarget.isTerminated())
targets.add(iDebugTarget);
}
}
sessionDropdown.setInput(targets);
if (!targets.isEmpty()) {
IDebugTarget dt = targets.iterator().next();
sessionDropdown.setSelection(new StructuredSelection(dt), true);
activeTargetChanged(dt);
}
return this.sessionDropdown;
}