@Override
  public void addMessage(Object sessionId, CompilerMessage message) {
    if (ApplicationManager.getApplication().isDispatchThread()) {
      openMessageView(sessionId);
      doAddMessage(message);
    }
    else {
      ApplicationManager.getApplication().invokeLater(() -> {
        if (!myProject.isDisposed()) {
          openMessageView(sessionId);
          doAddMessage(message);
        }
      }, ModalityState.nonModal());
    }
  }
@Override
  public void addMessage(Object sessionId, CompilerMessage message)