@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file) {
    try {
      if (!file.getFileType().equals(GroovyFileType.GROOVY_FILE_TYPE)) {
        return null;
      }
      // do not show the panel for Gradle build scripts
      // expecting groovy library to always be available at the gradle distribution
      if (StringUtil.endsWith(file.getName(), ".gradle") ||
          CompilerManager.getInstance(project).isExcludedFromCompilation(file)) {
        return null;
      }

      final Module module = ModuleUtilCore.findModuleForFile(file, project);
      if (module == null || isMavenModule(module)) {
        return null;
      }

      for (GroovyFrameworkConfigNotification configNotification : GroovyFrameworkConfigNotification.EP_NAME.getExtensions()) {
        if (configNotification.hasFrameworkStructure(module)) {
          return configNotification.hasFrameworkLibrary(module) ?
                 null :
                 fileEditor -> createConfigureNotificationPanel(module, fileEditor);
        }
      }

      return null;
    }
    catch (ProcessCanceledException | IndexNotReadyException ignored) {
      return null;
    }
  }
@Override
  public @Nullable Function<? super @NotNull FileEditor, ? extends @Nullable JComponent> collectNotificationData(@NotNull Project project,
                                                                                                                @NotNull VirtualFile file)