ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { final PsiElement psiElement = descriptor.getPsiElement(); final Iterable<String> ids; if (psiElement instanceof PsiAnnotation) { ids = JavaSuppressionUtil.getInspectionIdsSuppressedInAnnotation((PsiModifierList)psiElement.getParent()); } else { final String suppressedIds = JavaSuppressionUtil.getSuppressedInspectionIdsIn(psiElement); if (suppressedIds == null) { return ModCommand.nop(); } ids = StringUtil.tokenize(suppressedIds, ","); } return ModCommand.updateOption(psiElement, SuppressionAnnotationInspection.this, inspection -> { for (String id : ids) { if (!inspection.myAllowedSuppressions.contains(id)) { inspection.myAllowedSuppressions.add(id); } } }); }