@Override
    protected @Nullable InspectionGadgetsFix buildFix(Object... infos) {
      return new InspectionGadgetsFix() {
        @Override
        public @NotNull String getFamilyName() {
          return InspectionGadgetsBundle.message("create.package.info.java.family.name");
        }

        @Override
        public boolean startInWriteAction() {
          return false;
        }

        @Override
        protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
          DataManager.getInstance()
                     .getDataContextFromFocusAsync()
                     .onSuccess(context -> {
                       final AnActionEvent event = new AnActionEvent(null, context, "", new Presentation(), ActionManager.getInstance(), 0);
                       new CreatePackageInfoAction().actionPerformed(event);
                     });
        }

        @Override
        public @NotNull IntentionPreviewInfo generatePreview(@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) {
          Icon icon = FileTypeRegistry.getInstance().getFileTypeByFileName("package-info.java").getIcon();
          HtmlChunk fragment = HtmlChunk.fragment(HtmlChunk.text(getFamilyName()), HtmlChunk.icon("file", icon));
          return new IntentionPreviewInfo.Html(fragment);
        }
      };
    }
@Override
    protected @Nullable InspectionGadgetsFix buildFix(Object... infos)