本文整理汇总了Java中org.eclipse.debug.core.ILaunch.getDebugTargets方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunch.getDebugTargets方法的具体用法?Java ILaunch.getDebugTargets怎么用?Java ILaunch.getDebugTargets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunch
的用法示例。
在下文中一共展示了ILaunch.getDebugTargets方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: allTargetsTerminated
import org.eclipse.debug.core.ILaunch; //导入方法依赖的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;
}
示例2: launchRemoved
import org.eclipse.debug.core.ILaunch; //导入方法依赖的package包/类
public void launchRemoved(ILaunch launch) {
IDebugTarget[] debugTargets = launch.getDebugTargets();
for (IDebugTarget debugTarget : debugTargets) {
if (debugTarget instanceof SCTDebugTarget) {
unregisterSCTTarget((SCTDebugTarget) debugTarget);
}
}
}
示例3: launchAdded
import org.eclipse.debug.core.ILaunch; //导入方法依赖的package包/类
public void launchAdded(ILaunch launch) {
IDebugTarget[] debugTargets = launch.getDebugTargets();
for (IDebugTarget debugTarget : debugTargets) {
if (debugTarget instanceof SCTDebugTarget) {
registerSCTTarget((SCTDebugTarget) debugTarget);
}
}
}
示例4: launchChanged
import org.eclipse.debug.core.ILaunch; //导入方法依赖的package包/类
@Override
public void launchChanged(ILaunch launch) {
for (IDebugTarget newTarget : launch.getDebugTargets()) {
changeTarget(newTarget);
}
}
示例5: createSessionSelectorComponent
import org.eclipse.debug.core.ILaunch; //导入方法依赖的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;
}