private void showOutput(@NotNull OSProcessHandler originalHandler, @NotNull GoHistoryProcessListener historyProcessListener) { if (myShowOutputOnError) { BaseOSProcessHandler outputHandler = new KillableColoredProcessHandler(originalHandler.getProcess(), null); RunContentExecutor runContentExecutor = new RunContentExecutor(myProject, outputHandler) .withTitle(getPresentableName()) .withActivateToolWindow(myShowOutputOnError) .withFilter(new GoConsoleFilter(myProject, myModule, myWorkDirectory != null ? VfsUtilCore.pathToUrl(myWorkDirectory) : null)); Disposer.register(myProject, runContentExecutor); runContentExecutor.run(); historyProcessListener.apply(outputHandler); } if (myShowNotificationsOnError) { showNotification("Failed to run", NotificationType.ERROR); } }
private void showOutput(@NotNull OSProcessHandler originalHandler, @NotNull BallerinaHistoryProcessListener historyProcessListener) { if (myShowOutputOnError) { BaseOSProcessHandler outputHandler = new KillableColoredProcessHandler(originalHandler.getProcess(), null); RunContentExecutor runContentExecutor = new RunContentExecutor(myProject, outputHandler) .withTitle(getPresentableName()) .withActivateToolWindow(myShowOutputOnError) .withFilter(new BallerinaConsoleFilter(myProject, myModule, myWorkDirectory != null ? VfsUtilCore.pathToUrl(myWorkDirectory) : null)); Disposer.register(myProject, runContentExecutor); runContentExecutor.run(); historyProcessListener.apply(outputHandler); } if (myShowNotificationsOnError) { showNotification("Failed to run", NotificationType.ERROR); } }
OSProcessManager.getInstance().killProcessTree(processHandler.getProcess()); break;
@Override public void shutdown() { super.shutdown(); ProcessHandler processHandler = getProcessHandler(); if (processHandler instanceof OSProcessHandler) { // todo[nik] remove later. This fix is necessary only for IDEA 8.x ((OSProcessHandler) processHandler).getProcess().destroy(); } } }