List<LineMarkerInfo<PsiElement>> (@NotNull Set<PsiMethod> methodSet, @NotNull PsiClass containingClass) { if (!shouldSearchOverriddenMethods() && !shouldSearchImplementedMethods()) return Collections.emptyList(); // Value = true -> functional interface which may have only functional implementations Map<PsiMethod, Boolean> overridden = new HashMap<>(); AllOverridingMethodsSearch.search(containingClass).forEach(pair -> { ProgressManager.checkCanceled(); PsiMethod superMethod = pair.getFirst(); if (methodSet.remove(superMethod)) { overridden.put(superMethod, false); } return !methodSet.isEmpty(); }); if (!methodSet.isEmpty()) { PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(containingClass); if (interfaceMethod != null && methodSet.contains(interfaceMethod)) { overridden.put(interfaceMethod, true); } } List<LineMarkerInfo<PsiElement>> result = new ArrayList<>(overridden.size()); for (Map.Entry<PsiMethod, Boolean> entry : overridden.entrySet()) { ProgressManager.checkCanceled(); PsiMethod method = entry.getKey(); boolean overrides = !method.hasModifierProperty(PsiModifier.ABSTRACT); if (overrides && !shouldSearchOverriddenMethods()) continue; if (!overrides && !shouldSearchImplementedMethods()) continue; PsiElement range = getMethodRange(method); LineMarkerInfo<PsiElement> info = createMarker(overrides, range, MarkerType.OVERRIDDEN_METHOD); NavigateAction.setNavigateAction(info, overrides ? JavaBundle.message("action.go.to.overriding.methods.text") : entry.getValue() ? JavaBundle.message("action.go.to.functional.implementation.text") : JavaBundle.message("action.go.to.implementation.text"), IdeActions.ACTION_GOTO_IMPLEMENTATION); result.add(info); } return result; }