private static void runEmptyBuildTask(@NotNull Project project,
                                        @NotNull ProjectTaskContext context,
                                        @NotNull MyNotificationCollector notificationCollector,
                                        @NotNull Map<Class<? extends ProjectTask>, List<ProjectTask>> tasksMap) {
    Collection<? extends ProjectTask> buildTasks = tasksMap.get(EmptyCompileScopeBuildTask.class);
    if (ContainerUtil.isEmpty(buildTasks)) {
      return;
    }

    CompilerManager compilerManager = CompilerManager.getInstance(project);
    CompileScope scope = createScope(compilerManager, context, Collections.emptySet(), false, false, true);
    // this will effectively run all before- and after- compilation tasks registered within CompilerManager
    EmptyCompileScopeBuildTask task = (EmptyCompileScopeBuildTask)buildTasks.iterator().next();
    if (task.isIncrementalBuild()) {
      compilerManager.make(scope, new MyCompileStatusNotification(notificationCollector));
    }
    else {
      compilerManager.compile(scope, new MyCompileStatusNotification(notificationCollector));
    }
  }
private static void runEmptyBuildTask(@NotNull Project project,
                                        @NotNull ProjectTaskContext context,
                                        @NotNull MyNotificationCollector notificationCollector,
                                        @NotNull Map<Class<? extends ProjectTask>, List<ProjectTask>> tasksMap)