void (final ProcessHandler process) { if (process != null) { final ProcessAdapter stopListener = new ProcessAdapter() { @Override public void processTerminated(final @NotNull ProcessEvent event) { process.removeProcessListener(this); stopRunning(true); } }; process.addProcessListener(stopListener); } }