}
}
// else get selected thread and determine if any of the stack frames
// is executing in a working memory, if so, use that one
if (input == null) {
IDebugContextService debugContextService = DebugContextManager.getDefault().getContextService(getSite().getWorkbenchWindow());
if (debugContextService != null) {
ISelection stackSelection = debugContextService.getActiveContext();
if (stackSelection instanceof IStructuredSelection) {
Object selection = ((IStructuredSelection) stackSelection).getFirstElement();
if (selection instanceof IJavaStackFrame) {
try {
IJavaThread thread = (IJavaThread) ((IJavaStackFrame) selection).getThread();