use of com.google.idea.blaze.base.scope.scopes.NotificationScope in project intellij by bazelbuild.
the class BlazeBuildService method buildProject.
public void buildProject(Project project) {
if (project == null || !Blaze.isBlazeProject(project)) {
return;
}
ProjectViewSet projectViewSet = ProjectViewManager.getInstance(project).getProjectViewSet();
if (projectViewSet == null) {
return;
}
buildTargetExpressions(project, projectViewSet.listItems(TargetSection.KEY), projectViewSet, new NotificationScope(project, "Make", "Make project", "Make project completed successfully", "Make project failed"));
// In case the user touched a file, but didn't change its content. The user will get a false
// positive for class file out of date. We need a way for the user to suppress the false
// message. Clicking the "build project" link should at least make the message go away.
project.putUserData(PROJECT_LAST_BUILD_TIMESTAMP_KEY, System.currentTimeMillis());
}
use of com.google.idea.blaze.base.scope.scopes.NotificationScope 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);
});
}
Aggregations