boolean (@NotNull 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( JavaCompilerBundle.message(beforeTasks ? "progress.executing.precompile.tasks" : "progress.executing.postcompile.tasks") ); for (CompileTask task : tasks) { try { if (!task.execute(context)) { return false; } } catch (ProcessCanceledException e) { throw e; } catch (Throwable t) { LOG.error("Error executing task", t); context.addMessage( CompilerMessageCategory.INFORMATION, JavaCompilerBundle.message("error.task.0.execution.failed", task.toString()), null, -1, -1 ); } } } } finally { progressIndicator.popState(); StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject); if (statusBar != null) { statusBar.setInfo(""); } } return true; }