void (@NotNull PsiElement highlightingElement, @NotNull PsiClass psiClass, @NotNull Collection<? super RelatedItemLineMarkerInfo<?>> result) { final boolean descriptionEnabled = myDescriptionOption.isEnabled(); final boolean beforeAfterEnabled = myBeforeAfterOption.isEnabled(); if (!descriptionEnabled && !beforeAfterEnabled) return; if (!PsiUtil.isInstantiable(psiClass)) return; Module module = ModuleUtilCore.findModuleForPsiElement(psiClass); if (module == null) return; for (DescriptionType type : DescriptionType.values()) { if (!InheritanceUtil.isInheritor(psiClass, type.getClassName())) { continue; } String descriptionDirName = DescriptionCheckerUtil.getDescriptionDirName(psiClass); if (StringUtil.isEmptyOrSpaces(descriptionDirName)) { return; } if (type == DescriptionType.INSPECTION) { if (!descriptionEnabled) return; final InspectionDescriptionInfo info = InspectionDescriptionInfo.create(module, psiClass); if (info.hasDescriptionFile()) { addDescriptionFileGutterIcon(highlightingElement, info.getDescriptionFile(), result); } return; } for (PsiDirectory descriptionDir : DescriptionCheckerUtil.getDescriptionsDirs(module, type)) { PsiDirectory dir = descriptionDir.findSubdirectory(descriptionDirName); if (dir == null) continue; final PsiFile descriptionFile = dir.findFile("description.html"); if (descriptionFile != null) { if (descriptionEnabled) { addDescriptionFileGutterIcon(highlightingElement, descriptionFile, result); } if (beforeAfterEnabled) { addBeforeAfterTemplateFilesGutterIcon(highlightingElement, dir, result); } return; } } return; } }