Search in sources :

Example 1 with ProgressIndicatorScope

use of com.google.idea.blaze.base.scope.scopes.ProgressIndicatorScope in project intellij by bazelbuild.

the class BlazeSyncTask method run.

@Override
public void run(final ProgressIndicator indicator) {
    Scope.root((BlazeContext context) -> {
        context.push(new ExperimentScope());
        if (showPerformanceWarnings) {
            context.push(new PerformanceWarningScope());
        }
        context.push(new ProgressIndicatorScope(indicator));
        if (!syncParams.backgroundSync) {
            context.push(new BlazeConsoleScope.Builder(project, indicator).setPopupBehavior(BlazeUserSettings.getInstance().getShowBlazeConsoleOnSync()).addConsoleFilters(new IssueOutputFilter(project, workspaceRoot, BlazeInvocationContext.Sync, true)).build()).push(new IssuesScope(project, true)).push(new IdeaLogScope()).push(new NotificationScope(project, "Sync", "Sync project", "Sync successful", "Sync failed"));
        }
        context.output(new StatusOutput(String.format("Syncing project: %s...", syncParams)));
        syncProject(context);
    });
}
Also used : PerformanceWarningScope(com.google.idea.blaze.base.scope.scopes.PerformanceWarningScope) IdeaLogScope(com.google.idea.blaze.base.scope.scopes.IdeaLogScope) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) BlazeConsoleScope(com.google.idea.blaze.base.scope.scopes.BlazeConsoleScope) IssueOutputFilter(com.google.idea.blaze.base.issueparser.IssueOutputFilter) ExperimentScope(com.google.idea.blaze.base.experiments.ExperimentScope) IssuesScope(com.google.idea.blaze.base.scope.scopes.IssuesScope) ProgressIndicatorScope(com.google.idea.blaze.base.scope.scopes.ProgressIndicatorScope) NotificationScope(com.google.idea.blaze.base.scope.scopes.NotificationScope) StatusOutput(com.google.idea.blaze.base.scope.output.StatusOutput)

Aggregations

ExperimentScope (com.google.idea.blaze.base.experiments.ExperimentScope)1 IssueOutputFilter (com.google.idea.blaze.base.issueparser.IssueOutputFilter)1 BlazeContext (com.google.idea.blaze.base.scope.BlazeContext)1 StatusOutput (com.google.idea.blaze.base.scope.output.StatusOutput)1 BlazeConsoleScope (com.google.idea.blaze.base.scope.scopes.BlazeConsoleScope)1 IdeaLogScope (com.google.idea.blaze.base.scope.scopes.IdeaLogScope)1 IssuesScope (com.google.idea.blaze.base.scope.scopes.IssuesScope)1 NotificationScope (com.google.idea.blaze.base.scope.scopes.NotificationScope)1 PerformanceWarningScope (com.google.idea.blaze.base.scope.scopes.PerformanceWarningScope)1 ProgressIndicatorScope (com.google.idea.blaze.base.scope.scopes.ProgressIndicatorScope)1