@Override
  public void invoke(final @NotNull Project project, final @NotNull Editor editor, final @NotNull PsiFile file) {
    FeatureUsageTracker.getInstance().triggerFeatureUsed(GotoSuperAction.FEATURE_ID);

    int offset = editor.getCaretModel().getOffset();
    new PsiTargetNavigator<>(() -> Arrays.asList(DumbService.getInstance(project).computeWithAlternativeResolveEnabled(
      () -> findSuperElements(file, offset))))
      .elementsConsumer((elements, navigator) -> {
        if (!elements.isEmpty() && elements.iterator().next() instanceof PsiMethod) {
          boolean showMethodNames = !PsiUtil.allMethodsHaveSameSignature(elements.toArray(PsiMethod.EMPTY_ARRAY));
          navigator.presentationProvider(element -> GotoTargetHandler.computePresentation(element, showMethodNames));
          navigator.title(CodeInsightBundle.message("goto.super.method.chooser.title"));
        }
        else {
          navigator.title(JavaBundle.message("goto.super.class.chooser.title"));
        }
      })
      .navigate(editor, null, element -> EditSourceUtil.navigateToPsiElement(element));
  }
@Override
  public void invoke(final @NotNull Project project, final @NotNull Editor editor, final @NotNull PsiFile file)