{
DebuggerContext ctx = DebuggerContextManager.getDefault();
ThreadContext threadCtx = ctx.getThreadContext();
String threadId = commandLine.getValue(Options.THREAD_ID_OPTION);
IJavaThread steppingThread = null;
if (threadId == null) {
steppingThread = threadCtx.getSteppingThread();
} else {
steppingThread = threadCtx.getThread(Long.parseLong(threadId));
}
if (steppingThread == null) {
return Services.getMessage("debugging.stepping.thread.absent");
} else if (!steppingThread.isSuspended()) {
return Services.getMessage("debugging.stepping.thread.not.suspended");
}
if (steppingThread != null) {
// Set this thread to be the stepping thread
threadCtx.setSteppingThread(steppingThread);
}
String action = commandLine.getValue(Options.ACTION_OPTION);
if (action.equals(ACTION_INTO)) {
steppingThread.stepInto();
} else if (action.equals(ACTION_OVER)) {
steppingThread.stepOver();
} else if (action.equals(ACTION_RETURN)) {
steppingThread.stepReturn();
}
return null;
}