com.intellij.execution.filters.ConsoleFilterProvider Java Examples
The following examples show how to use
com.intellij.execution.filters.ConsoleFilterProvider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConsoleViewUtil.java From consulo with Apache License 2.0 | 6 votes |
@Nonnull public static List<Filter> computeConsoleFilters(@Nonnull Project project, @Nullable ConsoleView consoleView, @Nonnull GlobalSearchScope searchScope) { List<Filter> result = new ArrayList<>(); for (ConsoleFilterProvider eachProvider : ConsoleFilterProvider.FILTER_PROVIDERS.getExtensions()) { Filter[] filters; if (consoleView != null && eachProvider instanceof ConsoleDependentFilterProvider) { filters = ((ConsoleDependentFilterProvider)eachProvider).getDefaultFilters(consoleView, project, searchScope); } else if (eachProvider instanceof ConsoleFilterProviderEx) { filters = ((ConsoleFilterProviderEx)eachProvider).getDefaultFilters(project, searchScope); } else { filters = eachProvider.getDefaultFilters(project); } ContainerUtil.addAll(result, filters); } return result; }
Example #2
Source File: BlazeConsoleView.java From intellij with Apache License 2.0 | 5 votes |
/** Add the global filters, wrapped to separate them from blaze problems. */ private void addWrappedPredefinedFilters() { GlobalSearchScope scope = GlobalSearchScope.allScope(project); for (ConsoleFilterProvider provider : ConsoleFilterProvider.FILTER_PROVIDERS.getExtensions()) { Arrays.stream(getFilters(scope, provider)) .forEach(f -> consoleView.addMessageFilter(NonProblemFilterWrapper.wrap(f))); } }
Example #3
Source File: BlazeConsoleView.java From intellij with Apache License 2.0 | 5 votes |
private Filter[] getFilters(GlobalSearchScope scope, ConsoleFilterProvider provider) { if (provider instanceof ConsoleDependentFilterProvider) { return ((ConsoleDependentFilterProvider) provider) .getDefaultFilters(consoleView, project, scope); } if (provider instanceof ConsoleFilterProviderEx) { return ((ConsoleFilterProviderEx) provider).getDefaultFilters(project, scope); } return provider.getDefaultFilters(project); }