@Override
  public void update(@NotNull AnActionEvent event) {
    final Presentation presentation = event.getPresentation();

    // keep track of enabled status
    presentation.setEnabled(isEnabled(event, true));

    // provide icon for toolbar
    if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) {
      updateToolbar(event);
    }
    else if (ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) {
      updateMainMenu(event);
    }
    else if (ActionPlaces.EDITOR_POPUP.equals(event.getPlace())) {
      presentation.setVisible(presentation.isEnabled());
    }
  }
@Override
  public void update(@NotNull AnActionEvent event)