private void prepareMessageView(Object sessionId, ProgressIndicator indicator) {
    if (indicator.isRunning() && !myMessageViewWasPrepared.getAndSet(true)) {
      ApplicationManager.getApplication().invokeLater(() -> {
        final Project project = myProject;
        if (!project.isDisposed()) {
          synchronized (myMessageViewLock) {
            if (myErrorTreeView == null) {
              MessageView messageView = project.getServiceIfCreated(MessageView.class);
              if (messageView != null && messageView.getContentManager().getContentCount() > 0) {
                // only do something if there are already contains from previous compilations present
                // this will add the new content for this task and clear messages from previous compilations
                openMessageView(sessionId);
              }
            }
          }
        }
      });
    }
  }
private void prepareMessageView(Object sessionId, ProgressIndicator indicator)