void (DebuggerContextImpl context) { DebuggerSession session = context.getDebuggerSession(); final RefreshThreadsTreeCommand command = new RefreshThreadsTreeCommand(session); final DebuggerSession.State state = session != null ? session.getState() : DebuggerSession.State.DISPOSED; if (ApplicationManager.getApplication().isUnitTestMode() || state == DebuggerSession.State.PAUSED || state == DebuggerSession.State.RUNNING) { showMessage(MessageDescriptor.EVALUATING); context.getDebugProcess().getManagerThread().schedule(command); } else { showMessage(session != null ? session.getStateDescription() : JavaDebuggerBundle.message("status.debug.stopped")); } }