@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { GoExecutor executor = patchExecutor(createCommonExecutor()); GeneralCommandLine commandLine = executor.withParameterString(myConfiguration.getParams()).createCommandLine(); KillableColoredProcessHandler handler = new KillableColoredProcessHandler(commandLine, true); ProcessTerminatedListener.attach(handler); return handler; }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { BallerinaExecutor executor = patchExecutor(createCommonExecutor()); // We only need to set parameters. GeneralCommandLine commandLine = executor.withParameterString(myConfiguration.getParams()).createCommandLine(); KillableColoredProcessHandler handler = new KillableColoredProcessHandler(commandLine, true); ProcessTerminatedListener.attach(handler); return handler; }
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); } }
commandLine = createCommandLine(); GeneralCommandLine finalCommandLine = commandLine; myProcessHandler = new KillableColoredProcessHandler(finalCommandLine, true) { @Override public void startNotify() {
commandLine = createCommandLine(); GeneralCommandLine finalCommandLine = commandLine; myProcessHandler = new KillableColoredProcessHandler(finalCommandLine, true) { @Override public void startNotify() {
protected ProcessHandler startInSimulator() throws ExecutionException { GeneralCommandLine runInSimulatorCmd = createRunInSimulatorCmd(); return new KillableColoredProcessHandler(runInSimulatorCmd); }
/** * Creates a process and process handler to be run in console. */ @NotNull protected ProcessHandler doCreateConsoleProcessHandler(@NotNull PerlCommandLine commandLine) throws ExecutionException { return new KillableColoredProcessHandler(createConsoleProcess(commandLine), commandLine.getCommandLineString(), commandLine.getCharset()); }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { String workingDir = BashRunConfigUtil.findWorkingDir(runConfig); GeneralCommandLine cmd = BashRunConfigUtil.createCommandLine(workingDir, runConfig); if (!cmd.getEnvironment().containsKey("TERM")) { cmd.getEnvironment().put("TERM", "xterm-256color"); } OSProcessHandler processHandler = new KillableColoredProcessHandler(cmd); ProcessTerminatedListener.attach(processHandler, getEnvironment().getProject()); //fixme handle path macros return processHandler; } }