Search in sources :

Example 1 with ContextType

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());
    }
}
Also used : ContextType(com.google.idea.blaze.base.command.BlazeInvocationContext.ContextType) Task(com.google.idea.blaze.base.toolwindow.Task) IssueOutputFilter(com.google.idea.blaze.base.issueparser.IssueOutputFilter) ToolWindowScope(com.google.idea.blaze.base.scope.scopes.ToolWindowScope)

Aggregations

ContextType (com.google.idea.blaze.base.command.BlazeInvocationContext.ContextType)1 IssueOutputFilter (com.google.idea.blaze.base.issueparser.IssueOutputFilter)1 ToolWindowScope (com.google.idea.blaze.base.scope.scopes.ToolWindowScope)1 Task (com.google.idea.blaze.base.toolwindow.Task)1