IJavaDebugTarget javaTarget = (IJavaDebugTarget) target
.getAdapter(IJavaDebugTarget.class);
if (javaTarget != null) {
IThread[] threads = javaTarget.getThreads();
for (int i = 0; i < threads.length; i++) {
IThread thread = threads[i];
if (thread.isSuspended()) {
return (IJavaStackFrame) thread.getTopStackFrame();
}
}
}
return null;
}