PsiElement (@NotNull PsiJavaDocumentedElement owner, @NotNull String inspectionToolID) { PsiDocComment docComment = owner.getDocComment(); if (docComment == null && owner.getParent() instanceof PsiDeclarationStatement) { PsiElement el = PsiTreeUtil.skipWhitespacesBackward(owner.getParent()); if (el instanceof PsiDocComment) { docComment = (PsiDocComment)el; } } if (docComment != null) { PsiDocTag inspectionTag = docComment.findTagByName(SuppressionUtilCore.SUPPRESS_INSPECTIONS_TAG_NAME); if (inspectionTag != null) { PsiElement[] dataElements = inspectionTag.getDataElements(); for (PsiElement dataElement : dataElements) { String valueText = dataElement.getText(); if (SuppressionUtil.isInspectionToolIdMentioned(valueText, inspectionToolID)) { return docComment; } } } } return null; }