List<LineMarkerInfo<PsiElement>> (@NotNull PsiClass aClass) { if (!shouldSearchImplementedMethods() && !shouldSearchOverriddenMethods()) { return Collections.emptyList(); } if (aClass.hasModifierProperty(PsiModifier.FINAL)) { return Collections.emptyList(); } if (CommonClassNames.JAVA_LANG_OBJECT.equals(aClass.getQualifiedName())) { return Collections.emptyList(); // It's useless to have overridden markers for object. } PsiClass subClass = DirectClassInheritorsSearch.search(aClass).findFirst(); if (subClass != null || LambdaUtil.isFunctionalClass(aClass)) { boolean overridden = !aClass.isInterface(); boolean shouldSearch = overridden ? shouldSearchOverriddenMethods() : shouldSearchImplementedMethods(); if (!shouldSearch) return Collections.emptyList(); PsiElement range = aClass.getNameIdentifier(); if (range == null) { range = aClass; } LineMarkerInfo<PsiElement> info = createMarker(overridden, range, MarkerType.SUBCLASSED_CLASS); NavigateAction.setNavigateAction(info, overridden ? JavaBundle.message("action.go.to.subclass.text") : subClass == null ? JavaBundle.message("action.go.to.functional.implementation.text") : JavaBundle.message("action.go.to.implementation.text"), IdeActions.ACTION_GOTO_IMPLEMENTATION); return Collections.singletonList(info); } return Collections.emptyList(); }