@Override
  public @NotNull Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file) {
    return fileEditor -> {
      if (!(fileEditor instanceof TextEditor) || fileEditor.getUserData(LargeFileEditorProvider.IS_LARGE) != Boolean.TRUE) {
        return null;
      }

      Editor editor = ((TextEditor)fileEditor).getEditor();
      if (editor.getUserData(HIDDEN_KEY) != null || PropertiesComponent.getInstance().isTrueValue(DISABLE_KEY)) {
        return null;
      }

      EditorNotificationPanel panel = new EditorNotificationPanel(fileEditor, EditorNotificationPanel.Status.Warning);
      panel.createActionLabel(IdeBundle.message("action.label.hide.notification"), () -> {
        editor.putUserData(HIDDEN_KEY, "true");
        update(file, project);
      });
      panel.createActionLabel(IdeBundle.message("label.dont.show"), () -> {
        PropertiesComponent.getInstance().setValue(DISABLE_KEY, "true");
        update(file, project);
      });
      return panel.text(IdeBundle.message(
        "large.file.preview.notification",
        StringUtil.formatFileSize(file.getLength()),
        StringUtil.formatFileSize(FileUtilRt.LARGE_FILE_PREVIEW_SIZE)
      ));
    };
  }
@Override
  public @NotNull Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file)