/**
* <copyright>
* </copyright>
*
*
*/
package robot.resource.robot.debug;
public class RobotDebugProcess extends robot.resource.robot.debug.RobotDebugElement implements org.eclipse.debug.core.model.IProcess, robot.resource.robot.debug.IRobotDebugEventListener {
private org.eclipse.debug.core.ILaunch launch;
private boolean terminated = false;
public RobotDebugProcess(org.eclipse.debug.core.ILaunch launch) {
super(launch.getDebugTarget());
this.launch = launch;
}
public boolean canTerminate() {
return !terminated;
}
public boolean isTerminated() {
return terminated;
}
public void terminate() throws org.eclipse.debug.core.DebugException {
terminated = true;
}
public String getLabel() {
return null;
}
public org.eclipse.debug.core.ILaunch getLaunch() {
return launch;
}
public org.eclipse.debug.core.model.IStreamsProxy getStreamsProxy() {
return null;
}
public void setAttribute(String key, String value) {
}
public String getAttribute(String key) {
return null;
}
public int getExitValue() throws org.eclipse.debug.core.DebugException {
return 0;
}
public void handleMessage(robot.resource.robot.debug.RobotDebugMessage message) {
if (message.hasType(robot.resource.robot.debug.ERobotDebugMessageTypes.TERMINATED)) {
terminated = true;
} else {
// ignore other events
}
}
}