use of com.goide.runconfig.GoConsoleFilter in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoExecutor method showOutput.
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);
}
}
use of com.goide.runconfig.GoConsoleFilter in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoTestRunningState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
ProcessHandler processHandler = startProcess();
TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(myConfiguration.getProject());
setConsoleBuilder(consoleBuilder);
GoTestConsoleProperties consoleProperties = new GoTestConsoleProperties(myConfiguration, executor);
String frameworkName = myConfiguration.getTestFramework().getName();
ConsoleView consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole(frameworkName, processHandler, consoleProperties);
consoleView.addMessageFilter(new GoConsoleFilter(myConfiguration.getProject(), myModule, myConfiguration.getWorkingDirectoryUrl()));
ProcessTerminatedListener.attach(processHandler);
DefaultExecutionResult executionResult = new DefaultExecutionResult(consoleView, processHandler);
AbstractRerunFailedTestsAction rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(consoleView);
if (rerunFailedTestsAction != null) {
rerunFailedTestsAction.setModelProvider(((SMTRunnerConsoleView) consoleView)::getResultsViewer);
executionResult.setRestartActions(rerunFailedTestsAction, new ToggleAutoTestAction());
} else {
executionResult.setRestartActions(new ToggleAutoTestAction());
}
return executionResult;
}
Aggregations