void (final DebugProcessImpl debugProcess, boolean closedByUser) { if (!closedByUser) { ProcessHandler processHandler = debugProcess.getProcessHandler(); if (processHandler != null) { processHandler.notifyTextAvailable( JavaDebuggerBundle.message("status.disconnected", DebuggerUtilsImpl.getConnectionDisplayName(debugProcess.getConnection())) + "\n", ProcessOutputTypes.SYSTEM); } } DebuggerInvocationUtil.invokeLater(getProject(), () -> getContextManager().setState(SESSION_EMPTY_CONTEXT, State.STOPPED, Event.DETACHED, JavaDebuggerBundle.message("status.disconnected", DebuggerUtilsImpl.getConnectionDisplayName(debugProcess.getConnection())))); clearSteppingThrough(); }