@Override
  public void update(@NotNull AnActionEvent event) {
    Project project = event.getData(CommonDataKeys.PROJECT);
    ProjectView view = project == null ? null : ProjectView.getInstance(project);
    if (ActionPlaces.PROJECT_VIEW_POPUP.equals(event.getPlace())) {
      event.getPresentation().setEnabledAndVisible(view != null && view.getCurrentViewId().equals(ScopeViewPane.ID));
    }
    else {
      event.getPresentation().setEnabledAndVisible(view != null && view.getProjectViewPaneById(ScopeViewPane.ID) != null);
    }
    if (ActionPlaces.TOOLWINDOW_POPUP.equals(event.getPlace())) {
      event.getPresentation().setIcon(null);
    }
  }
@Override
  public void update(@NotNull AnActionEvent event)