private @NotNull AnAction createAction(@NotNull String id, @NotNull Icon icon) {
    AnAction delegate = ActionManager.getInstance().getAction(id);
    AnAction result = new MarkupModelDelegateAction(delegate){
      @Override
      public void update(@NotNull AnActionEvent e) {
        if(RedesignedInspectionsManager.isAvailable()) {
          e.getPresentation().setEnabledAndVisible(false);
          return;
        }
        e.getPresentation().setEnabledAndVisible(true);
        super.update(e);
      }
    };
    result.getTemplatePresentation().setIcon(icon);
    return result;
  }
private @NotNull AnAction createAction(@NotNull String id, @NotNull Icon icon)