private boolean executeCompileTasks()

in src/main/java/com/intellij/compiler/impl/InternalCompileDriver.java [541:571]


    private boolean executeCompileTasks(final CompileContext context, final boolean beforeTasks) {
        if (myProject.isDisposed()) {
            return false;
        }
        final CompilerManager manager = CompilerManager.getInstance(myProject);
        final ProgressIndicator progressIndicator = context.getProgressIndicator();
        progressIndicator.pushState();
        try {
            List<CompileTask> tasks = beforeTasks ? manager.getBeforeTasks() : manager.getAfterTaskList();
            if (tasks.size() > 0) {
                progressIndicator.setText(
                        CompilerBundle.message(beforeTasks ? "progress.executing.precompile.tasks" : "progress.executing.postcompile.tasks"));
                for (CompileTask task : tasks) {
                    if (!task.execute(context)) {
                        return false;
                    }
                }
            }
        }
        finally {
            progressIndicator.popState();
            StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject);
            if (statusBar != null) {
                statusBar.setInfo("");
            }
            if (progressIndicator instanceof CompilerTask) {
                ApplicationManager.getApplication().invokeLater(((CompilerTask)progressIndicator)::showCompilerContent);
            }
        }
        return true;
    }