use of com.google.idea.blaze.base.command.BlazeInvocationContext.ContextType in project intellij by bazelbuild.
the class BlazeIdeInterfaceAspectsImpl method setupToolWindow.
private static void setupToolWindow(Project project, BlazeContext parentContext, BlazeContext childContext, WorkspaceRoot workspaceRoot, String taskName, boolean isSync) {
ContextType contextType = isSync ? ContextType.Sync : ContextType.Other;
Task.Type taskType = isSync ? Task.Type.BLAZE_SYNC : Task.Type.BLAZE_MAKE;
ToolWindowScope parentToolWindowScope = parentContext.getScope(ToolWindowScope.class);
Task parentTask = parentToolWindowScope != null ? parentToolWindowScope.getTask() : null;
childContext.push(new ToolWindowScope.Builder(project, new Task(taskName, taskType, parentTask)).setIssueParsers(BlazeIssueParser.defaultIssueParsers(project, workspaceRoot, contextType)).build());
if (BlazeConsoleExperimentManager.isBlazeConsoleV2Enabled()) {
childContext.push(new BlazeConsoleScope.Builder(project).addConsoleFilters(new IssueOutputFilter(project, workspaceRoot, contextType, true)).setClearPreviousState(false).build());
}
}
Aggregations