use of com.intellij.execution.filters.TextConsoleBuilderImpl in project intellij-plugins by JetBrains.
the class KarmaServerLogComponent method createConsole.
@NotNull
private static ConsoleView createConsole(@NotNull Project project) {
GlobalSearchScope scope = GlobalSearchScope.allScope(project);
TextConsoleBuilderImpl builder = new TextConsoleBuilderImpl(project, scope);
builder.setUsePredefinedMessageFilter(false);
builder.addFilter(new NodeStackTraceFilter(project));
return builder.getConsole();
}
use of com.intellij.execution.filters.TextConsoleBuilderImpl in project intellij by bazelbuild.
the class BlazeJavaRunProfileState method startProcess.
@Override
protected ProcessHandler startProcess() throws ExecutionException {
Project project = configuration.getProject();
BlazeCommand.Builder blazeCommand;
BlazeTestUiSession testUiSession = useTestUi() ? TestUiSessionProvider.getInstance(project).getTestUiSession(configuration.getTarget()) : null;
if (testUiSession != null) {
blazeCommand = getBlazeCommandBuilder(project, configuration, testUiSession.getBlazeFlags(), executorType);
setConsoleBuilder(new TextConsoleBuilderImpl(project) {
@Override
protected ConsoleView createConsole() {
return SmRunnerUtils.getConsoleView(project, configuration, getEnvironment().getExecutor(), testUiSession);
}
});
} else {
blazeCommand = getBlazeCommandBuilder(project, configuration, ImmutableList.of(), executorType);
}
addConsoleFilters(new BlazeTargetFilter(project, true), new IssueOutputFilter(project, WorkspaceRoot.fromProject(project), BlazeInvocationContext.NonSync, false));
List<String> command = HotSwapUtils.canHotSwap(getEnvironment()) ? getBashCommandsToRunScript(blazeCommand) : blazeCommand.build().toList();
WorkspaceRoot workspaceRoot = WorkspaceRoot.fromProject(project);
return new ScopedBlazeProcessHandler(project, command, workspaceRoot, new ScopedBlazeProcessHandler.ScopedProcessHandlerDelegate() {
@Override
public void onBlazeContextStart(BlazeContext context) {
context.push(new IssuesScope(project, BlazeUserSettings.getInstance().getShowProblemsViewForRunAction())).push(new IdeaLogScope());
}
@Override
public ImmutableList<ProcessListener> createProcessListeners(BlazeContext context) {
LineProcessingOutputStream outputStream = LineProcessingOutputStream.of(BlazeConsoleLineProcessorProvider.getAllStderrLineProcessors(context));
return ImmutableList.of(new LineProcessingProcessAdapter(outputStream));
}
});
}
use of com.intellij.execution.filters.TextConsoleBuilderImpl in project intellij-elixir by KronicDeth.
the class MixRunningState method execute.
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
TextConsoleBuilder consoleBuilder = new TextConsoleBuilderImpl(myConfiguration.getProject()) {
@Override
public ConsoleView getConsole() {
ConsoleView consoleView = super.getConsole();
ElixirConsoleUtil.attachFilters(myConfiguration.getProject(), consoleView);
return consoleView;
}
};
setConsoleBuilder(consoleBuilder);
return super.execute(executor, runner);
}
use of com.intellij.execution.filters.TextConsoleBuilderImpl in project flutter-intellij by flutter.
the class DaemonConsoleView method install.
/**
* Sets up a launcher to use a DaemonConsoleView.
*/
public static void install(@NotNull CommandLineState launcher, @NotNull ExecutionEnvironment env, @NotNull VirtualFile workDir) {
// Create our own console builder.
// We need to filter input to this console without affecting other consoles,
// so we cannot use a consoleFilterInputProvider.
final GlobalSearchScope searchScope = SearchScopeProvider.createSearchScope(env.getProject(), env.getRunProfile());
final TextConsoleBuilder builder = new TextConsoleBuilderImpl(env.getProject(), searchScope) {
@NotNull
@Override
protected ConsoleView createConsole() {
return new DaemonConsoleView(env.getProject(), searchScope);
}
};
// Set up basic console filters. (More may be added later.)
builder.addFilter(new DartRelativePathsConsoleFilter(env.getProject(), workDir.getPath()));
builder.addFilter(new UrlFilter());
launcher.setConsoleBuilder(builder);
}
Aggregations