private static void doBuild(@NotNull Project project, final @NotNull List<ArtifactPopupItem> items, boolean rebuild) {
    ProjectTaskManagerImpl.putBuildOriginator(project, BuildArtifactAction.class);
    final Artifact[] artifacts = getArtifacts(items, project);
    if (rebuild) {
      ProjectTaskManager.getInstance(project).rebuild(artifacts);
    }
    else {
      ProjectTaskManager.getInstance(project).build(artifacts);
    }
  }
private static void doBuild(@NotNull Project project, final @NotNull List<ArtifactPopupItem> items, boolean rebuild)