void (final @NotNull Set<? extends PsiMethod> methods, @NotNull Collection<? super LineMarkerInfo<?>> result) { final Set<PsiElement> overridden = new HashSet<>(); Set<PsiClass> classes = new HashSet<>(); for (PsiMethod method : methods) { ProgressManager.checkCanceled(); final PsiClass parentClass = method.getContainingClass(); if (parentClass != null && !CommonClassNames.JAVA_LANG_OBJECT.equals(parentClass.getQualifiedName())) { classes.add(parentClass); } } for (final PsiClass aClass : classes) { AllOverridingMethodsSearch.search(aClass).forEach(pair -> { ProgressManager.checkCanceled(); final PsiMethod superMethod = pair.getFirst(); if (isCorrectTarget(superMethod) && isCorrectTarget(pair.getSecond())) { if (methods.remove(superMethod)) { overridden.add(PsiImplUtil.handleMirror(superMethod)); } } return !methods.isEmpty(); }); } for (PsiElement element : overridden) { final Icon icon = AllIcons.Gutter.OverridenMethod; element = PsiImplUtil.handleMirror(element); PsiElement range = element instanceof GrNamedElement ? ((GrNamedElement)element).getNameIdentifierGroovy() : element; final MarkerType type = element instanceof GrField ? GroovyMarkerTypes.OVERRIDEN_PROPERTY_TYPE : GroovyMarkerTypes.GR_OVERRIDDEN_METHOD; LineMarkerInfo<?> info = new LineMarkerInfo<>(range, range.getTextRange(), icon, type.getTooltip(), type.getNavigationHandler(), GutterIconRenderer.Alignment.RIGHT); result.add(info); } }