private void openMessageView(Object sessionId) {
    if (isHeadlessMode() || myIndicator.isCanceled()) {
      return;
    }
    final JComponent component;
    synchronized (myMessageViewLock) {
      if (myErrorTreeView != null) {
        return;
      }
      myErrorTreeView = new CompilerErrorTreeView(myProject, myRestartWork);
      myErrorTreeView.setProcessController(new NewErrorTreeViewPanel.ProcessController() {
        @Override
        public void stopProcess() {
          if (!myIndicator.isCanceled()) {
            myIndicator.cancel();
          }
        }

        @Override
        public boolean isProcessStopped() {
          return !myIndicator.isRunning();
        }
      });
      component = myErrorTreeView.getComponent();
    }

    MessageView messageView = MessageView.getInstance(myProject);
    messageView.runWhenInitialized(() -> {
      Content content = ContentFactory.getInstance().createContent(component, myContentName, true);
      content.setHelpId(HelpID.COMPILER);
      CONTENT_ID_KEY.set(content, myContentId);
      SESSION_ID_KEY.set(content, sessionId);
      messageView.getContentManager().addContent(content);
      myCloseListener.setContent(content, messageView.getContentManager());
      removeOldContents(myProject, sessionId, content);
      messageView.getContentManager().setSelectedContent(content);
    });
  }
private void openMessageView(Object sessionId)