use of org.eclipse.debug.core.model.IDebugTarget in project statecharts by Yakindu.
the class SCTHotModelReplacementManager method handleCloseEvent.
private void handleCloseEvent(IResourceChangeEvent event) {
if (event.getResource() instanceof IProject) {
IProject project = ((IProject) event.getResource());
for (IDebugTarget target : activeTargets) {
EObject object = (EObject) target.getAdapter(EObject.class);
IFile file = WorkspaceSynchronizer.getFile(object.eResource());
if (project.equals(file.getProject())) {
try {
target.terminate();
} catch (DebugException e) {
e.printStackTrace();
}
}
}
}
}
use of org.eclipse.debug.core.model.IDebugTarget in project statecharts by Yakindu.
the class SCTSourceDisplayDispatcher method handleDebugTargetTerminated.
protected void handleDebugTargetTerminated(DebugEvent debugEvent) {
Object source = debugEvent.getSource();
if (source instanceof IDebugTarget) {
IDebugTarget target = (IDebugTarget) source;
if (target == activeDebugTarget) {
activeSourceDisplay.terminate(true);
activeSourceDisplay = null;
}
}
}
use of org.eclipse.debug.core.model.IDebugTarget in project bndtools by bndtools.
the class LaunchThread method getAdapter.
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class adapter) {
if (adapter.equals(IProcess.class)) {
return this;
}
if (adapter.equals(IDebugTarget.class)) {
ILaunch launch = getLaunch();
IDebugTarget[] targets = launch.getDebugTargets();
for (int i = 0; i < targets.length; i++) {
if (this.equals(targets[i].getProcess())) {
return targets[i];
}
}
return null;
}
if (adapter.equals(ILaunch.class)) {
return getLaunch();
}
if (adapter.equals(ILaunchConfiguration.class)) {
return getLaunch().getLaunchConfiguration();
}
return null;
}
Aggregations