addCommand(new ICECommand(new String[] { "re" }, true, true,
CommandType.DEBUG, new String[] { ":re" },
new String[] { "Resume execution of suspended CAL program." }) {
@Override
protected void performCommand(String info) {
ExecutionContextImpl ec = ICE.this.getExecutionContext();
if (ec.hasSuspendedThreads()) {
ec.setStepping(false);
command_resumeExecution();
} else {
iceLogger.log(Level.INFO, "There is no CAL program currently suspended.");
}
}
});
addCommand(new ICECommand(new String[] { "ret" }, true, true,
CommandType.DEBUG, new String[] { ":ret" },
new String[] { "Resume execution of the current suspended thread." }) {
@Override
protected void performCommand(String info) {
ExecutionContextImpl ec = ICE.this.getExecutionContext();
if (ec.hasSuspendedThreads()) {
ec.setStepping(false);
command_resumeCurrentThread(false);
} else {
iceLogger.log(Level.INFO, "There is no CAL program currently suspended.");
}
}
});
addCommand(new ICECommand(new String[] { "sus", "suspend" }, true, true,
CommandType.DEBUG, new String[] { ":sus[pend]" },
new String[] { "Suspend all threads in the executing CAL program." }) {
@Override
protected void performCommand(String info) {
if (runThread != null) {
runThread.requestSuspend();
}
}
});
addCommand(new ICECommand(new String[] { "threads" }, true, true,
CommandType.DEBUG, new String[] { ":threads" },
new String[] { "Show the current suspended threads." }) {
@Override
protected void performCommand(String info) {
ExecutionContextImpl ec = ICE.this.getExecutionContext();
if (ec.hasSuspendedThreads()) {
command_showSuspendedThreads();
} else {
iceLogger.log(Level.INFO, "There is no CAL program currently suspended.");
}
}
});
addCommand(new ICECommand(new String[] { "thread" }, true, true,
CommandType.DEBUG, new String[] { ":thread <thread id>" },
new String[] { "Set the current suspended thread." }) {
@Override
protected void performCommand(String info) {
ExecutionContextImpl ec = ICE.this.getExecutionContext();
if (ec.hasSuspendedThreads()) {
command_setSuspendedThread(info);
} else {
iceLogger.log(Level.INFO, "There is no CAL program currently suspended.");
}
}
});
addCommand(new ICECommand(new String[] { "te" }, true, true,
CommandType.DEBUG, new String[] { ":te" },
new String[] { "Terminate execution of suspended CAL program." }) {
@Override
protected void performCommand(String info) {
ExecutionContextImpl ec = ICE.this.getExecutionContext();
if (ec.hasSuspendedThreads()) {
command_terminateExecution(info);
ec.setStepping(false);
} else {
iceLogger.log(Level.INFO, "There is no CAL program currently suspended.");
}
}
});