private static void addAction(@NotNull DefaultActionGroup group, @NotNull MyAction action) {
    group.add(new DumbAwareAction(String.valueOf(action.getValue(Action.NAME))) {
      @Override
      public void update(@NotNull AnActionEvent event) {
        event.getPresentation().setEnabled(action.isEnabled());
      }

      @Override
      public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.EDT;
      }

      @Override
      public void actionPerformed(@NotNull AnActionEvent event) {
        action.actionPerformed(null);
      }
    });
  }
private static void addAction(@NotNull DefaultActionGroup group, @NotNull MyAction action)