@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                 @NotNull VirtualFile file) {
    return fileEditor -> {
      if (!(fileEditor instanceof LargeFileEditor largeFileEditor)) return null;

      Editor editor = largeFileEditor.getEditor();

      if (editor.getUserData(HIDDEN_KEY) != null) return null;

      if (!largeFileEditor.getSearchManager().canShowRegexSearchWarning()) return null;

      EditorNotificationPanel panel = new EditorNotificationPanel(fileEditor, EditorNotificationPanel.Status.Warning);
      panel.createActionLabel(EditorBundle.message("notification.hide.message"), () -> {
        editor.putUserData(HIDDEN_KEY, "true");
        update(file, project);
      });

      return panel.text(EditorBundle.message("message.warning.about.regex.search.limitations", String.valueOf(
        // 2 pages "*2" and bytes to Kbytes "/1000" gives "/500" (see regex search realization specificities)
        largeFileEditor.getPageSize() / 500
      )));
    };
  }
@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                 @NotNull VirtualFile file)