@Override
    public AnAction @Nullable [] getActions(@NotNull PsiFile file) {
      IndentOptions indentOptions = getIndentOptions();
      List<AnAction> actions = new ArrayList<>();
      final VirtualFile virtualFile = file.getVirtualFile();
      final Project project = file.getProject();
      final IndentOptions projectOptions = CodeStyle.getSettings(project).getIndentOptions(file.getFileType());
      final String projectOptionsTip = StringUtil.capitalizeWords(IndentStatusBarUIContributor.getIndentInfo(projectOptions), true);
      if (indentOptions instanceof TimeStampedIndentOptions) {
        if (((TimeStampedIndentOptions)indentOptions).isDetected()) {
          actions.add(
            DumbAwareAction.create(
              ApplicationBundle.message("code.style.indent.detector.reject", projectOptionsTip),
              e -> {
                disableForFile(virtualFile, indentOptions);
                notifyIndentOptionsChanged(project, virtualFile);
              }));
          final var reindentActionText = ApplicationBundle.message("code.style.indent.detector.reindent", projectOptionsTip);
          actions.add(
            DumbAwareAction.create(reindentActionText,
                                   e -> {
                                     disableForFile(virtualFile, indentOptions);
                                     final var document = FileDocumentManager.getInstance().getCachedDocument(virtualFile);
                                     if (document != null) {
                                       // IDEA-332405 -- make sure that detected indent options are not used for the "reindent file" action
                                       final var indentOptsWithoutDetected = CodeStyle
                                         .getSettings(project, virtualFile)
                                         .getIndentOptionsByFile(project, virtualFile, null, true, null);
                                       indentOptsWithoutDetected.associateWithDocument(document);
                                     }
                                     notifyIndentOptionsChanged(project, virtualFile);
                                     CommandProcessor.getInstance().executeCommand(
                                       project,
                                       () -> ApplicationManager.getApplication().runWriteAction(
                                         () -> {
                                           CodeStyleManager.getInstance(project).adjustLineIndent(file, file.getTextRange());
                                           UndoManager.getInstance(project).undoableActionPerformed(new BasicUndoableAction() {
                                             @Override
                                             public void undo() {
                                               notifyIndentOptionsChanged(project, virtualFile);
                                             }

                                             @Override
                                             public void redo() {
                                               notifyIndentOptionsChanged(project, virtualFile);
                                             }
                                           });
                                         }),
                                       reindentActionText,
                                       null
                                     );
                                     myDiscardedOptions.remove(virtualFile);
                                   }));
          actions.add(Separator.getInstance());
        }
      }
      else if (virtualFile != null && myDiscardedOptions.containsKey(virtualFile)) {
        final IndentOptions discardedOptions = myDiscardedOptions.get(virtualFile);
        final Document document = PsiDocumentManager.getInstance(project).getDocument(file);
        if (document != null) {
          actions.add(
            DumbAwareAction.create(
              ApplicationBundle
                .message("code.style.indent.detector.apply", IndentStatusBarUIContributor.getIndentInfo(discardedOptions),
                         ColorUtil.toHex(JBColor.GRAY)),
              e -> {
                myDiscardedOptions.remove(virtualFile);
                discardedOptions.associateWithDocument(document);
                notifyIndentOptionsChanged(project, virtualFile);
              }));
          actions.add(Separator.getInstance());
        }
      }
      return actions.toArray(AnAction.EMPTY_ARRAY);
    }
@Override
    public AnAction @Nullable [] getActions(@NotNull PsiFile file)