@Override
  public void onStart(Object sessionId, long startCompilationStamp, Runnable restartWork, ProgressIndicator indicator) {
    myCloseListener = new CloseListener();
    synchronized (myMessageViewLock) {
      myRestartWork = restartWork;
    }
    myIndicator = indicator;
    if (!isHeadlessMode()) {
      addIndicatorDelegate(myIndicator);
    }
    ProjectManager.getInstance().addProjectManagerListener(myProject, myCloseListener);
  }
@Override
  public void onStart(Object sessionId, long startCompilationStamp, Runnable restartWork, ProgressIndicator indicator)