void (@NotNull AnActionEvent e) { RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(e.getDataContext()); ProcessHandler activeProcessHandler = descriptor != null ? descriptor.getProcessHandler() : null; if (activeProcessHandler == null || activeProcessHandler.isProcessTerminated()) return; ConsoleView console = e.getData(LangDataKeys.CONSOLE_VIEW); if (console instanceof TerminalExecutionConsole) { sendEOFToPtyProcess(activeProcessHandler.getProcessInput()); return; } try (OutputStream input = activeProcessHandler.getProcessInput()) { if (input != null) { if (console != null) { console.print("^D\n", ConsoleViewContentType.SYSTEM_OUTPUT); } } } catch (IOException ignored) { } }