use of com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter in project intellij-plugins by JetBrains.
the class PubServerService method configureConsole.
@Override
protected void configureConsole(@NotNull final TextConsoleBuilder consoleBuilder) {
consoleBuilder.addFilter(new DartConsoleFilter(getProject(), firstServedDir));
consoleBuilder.addFilter(new DartRelativePathsConsoleFilter(getProject(), firstServedDir.getParent().getPath()));
consoleBuilder.addFilter(new UrlFilter());
}
use of com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter in project intellij-plugins by JetBrains.
the class DartPubActionBase method createConsole.
@NotNull
private static ConsoleView createConsole(@NotNull final Project project, @NotNull final VirtualFile pubspecYamlFile) {
final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
consoleBuilder.setViewer(true);
consoleBuilder.addFilter(new DartConsoleFilter(project, pubspecYamlFile));
consoleBuilder.addFilter(new DartRelativePathsConsoleFilter(project, pubspecYamlFile.getParent().getPath()));
consoleBuilder.addFilter(new UrlFilter());
return consoleBuilder.getConsole();
}
use of com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter in project intellij-plugins by JetBrains.
the class DartTestRunningState method createConsole.
private static ConsoleView createConsole(@NotNull ExecutionEnvironment env) {
final Project project = env.getProject();
final DartRunConfiguration runConfiguration = (DartRunConfiguration) env.getRunProfile();
final DartTestRunnerParameters runnerParameters = (DartTestRunnerParameters) runConfiguration.getRunnerParameters();
final TestConsoleProperties testConsoleProperties = new DartConsoleProperties(runConfiguration, env);
final ConsoleView consoleView = SMTestRunnerConnectionUtil.createConsole(DART_FRAMEWORK_NAME, testConsoleProperties);
try {
final VirtualFile dartFile = runnerParameters.getDartFileOrDirectory();
consoleView.addMessageFilter(new DartConsoleFilter(project, dartFile));
consoleView.addMessageFilter(new DartRelativePathsConsoleFilter(project, runnerParameters.computeProcessWorkingDirectory(project)));
consoleView.addMessageFilter(new UrlFilter());
} catch (RuntimeConfigurationError ignore) {
/* can't happen because already checked */
}
Disposer.register(project, consoleView);
return consoleView;
}
use of com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter 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);
}
use of com.jetbrains.lang.dart.ide.runner.DartRelativePathsConsoleFilter in project flutter-intellij by flutter.
the class TestLaunchState method createConsole.
@Nullable
@Override
protected ConsoleView createConsole(@NotNull Executor executor) throws ExecutionException {
if (!testConsoleEnabled) {
return super.createConsole(executor);
}
// Create a console showing a test tree.
final Project project = getEnvironment().getProject();
final DartUrlResolver resolver = DartUrlResolver.getInstance(project, testFileOrDir);
final ConsoleProps props = new ConsoleProps(config, executor, resolver);
final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole("FlutterTestRunner", props);
final Module module = ModuleUtil.findModuleForFile(testFileOrDir, project);
if (module != null) {
console.addMessageFilter(new FlutterConsoleFilter(module));
}
final String baseDir = getBaseDir();
if (baseDir != null) {
console.addMessageFilter(new DartRelativePathsConsoleFilter(project, baseDir));
}
console.addMessageFilter(new UrlFilter());
return console;
}
Aggregations