@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file) {
    if (!FileTypeRegistry.getInstance().isFileOfType(file, JavaClassFileType.INSTANCE)) {
      return null;
    }

    String classFileInfo = getTextWithClassFileInfo(file);
    Function<? super FileEditor, ? extends EditorNotificationPanel> notificationPanelCreator = fileEditor ->
      new EditorNotificationPanel(fileEditor, EditorNotificationPanel.Status.Info)
        .text(classFileInfo);

    VirtualFile sourceFile = JavaEditorFileSwapper.findSourceFile(project, file);
    if (sourceFile != null) {
      return notificationPanelCreator.andThen(panel -> {
        appendOpenFileAction(project, panel, sourceFile, JavaUiBundle.message("class.file.open.source.action"));
        return panel;
      });
    }

    List<? extends LibraryOrderEntry> libraries = findLibraryEntriesForFile(file, project);
    if (libraries.isEmpty()) {
      return notificationPanelCreator;
    }

    PsiFile psiFile = PsiManager.getInstance(project).findFile(file);

    VirtualFile baseFile = JavaMultiReleaseUtil.findBaseFile(file);
    if (baseFile != null) {
      VirtualFile baseSource = JavaEditorFileSwapper.findSourceFile(project, baseFile);
      if (baseSource != null) {
        return notificationPanelCreator.andThen(panel -> {
          appendOpenFileAction(project, panel, baseSource, JavaUiBundle.message("class.file.open.source.version.specific.action"));
          return panel;
        });
      }
    }

    List<? extends AttachSourcesProvider.AttachSourcesAction> actionsByFile = psiFile != null ?
                                                                              collectActions(libraries, psiFile) :
                                                                              List.of();

    boolean sourceFileIsInSameJar = sourceFileIsInSameJar(file);
    return notificationPanelCreator.andThen(panel -> {
      List<AttachSourcesProvider.AttachSourcesAction> actions = new ArrayList<>(actionsByFile);
      AttachSourcesProvider.AttachSourcesAction defaultAction = sourceFileIsInSameJar ?
                                                                new AttachJarAsSourcesAction(file) :
                                                                new ChooseAndAttachSourcesAction(project, panel);
      actions.add(defaultAction);

      for (AttachSourcesProvider.AttachSourcesAction action : actions) {
        panel.createActionLabel(GuiUtils.getTextWithoutMnemonicEscaping(action.getName()), () -> {
          findLibraryEntriesForFile(project, file, libraries, entries -> {
            String originalText = panel.getText();
            panel.setText(action.getBusyText());

            final long started = System.currentTimeMillis();
            final ActionCallback callback = action.perform(entries);
            callback.doWhenProcessed(() -> {
              panel.setText(originalText);
              if (psiFile != null) {
                ExternalSystemSourceAttachCollector.onSourcesAttached(project, action.getClass(), psiFile.getLanguage(), callback.isDone(),
                                                                      System.currentTimeMillis() - started);
              }
            });
          });
        });
      }

      return panel;
    });
  }
@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file)