private void refreshMainMenu() {
    ApplicationManager.getApplication().invokeLater(() -> {
      ProjectFrameHelper frame = WindowManagerEx.getInstanceEx().getFrameHelper(myProject);
      if (frame != null) {
        // GitToolbarWidgetAction handles update in a new UI
        if (ExperimentalUI.isNewUI()) {
          frame.rootPane.updateMainMenuActions();
        }
        else {
          frame.updateView();
        }
      }
    }, myProject.getDisposed());
  }
private void refreshMainMenu()