void (@NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { FeatureUsageTracker.getInstance().triggerFeatureUsed(GotoSuperAction.FEATURE_ID); int offset = editor.getCaretModel().getOffset(); new PsiTargetNavigator<>(() -> Arrays.asList(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)); }