void (@NotNull PsiFile file, @NotNull InspectionManager manager, @NotNull ProblemsHolder problemsHolder, @NotNull GlobalInspectionContext globalContext, @NotNull ProblemDescriptionsProcessor problemDescriptionsProcessor) { InspectionSuppressor extension = ContainerUtil.find(LanguageInspectionSuppressors.INSTANCE.allForLanguage(file.getLanguage()), s -> s instanceof RedundantSuppressionDetector); if (!(extension instanceof RedundantSuppressionDetector redundantSuppressionDetector)) return; InspectionProfileImpl profile = getProfile(manager, globalContext); CommonProblemDescriptor[] descriptors = checkElement(file, redundantSuppressionDetector, manager, profile); for (CommonProblemDescriptor descriptor : descriptors) { if (descriptor instanceof ProblemDescriptor problemDescriptor) { PsiElement psiElement = problemDescriptor.getPsiElement(); if (psiElement != null) { PsiElement member = globalContext.getRefManager().getContainerElement(psiElement); RefElement reference = globalContext.getRefManager().getReference(member); if (reference != null) { problemDescriptionsProcessor.addProblemElement(reference, descriptor); continue; } } } problemsHolder.registerProblem(file, descriptor.getDescriptionTemplate()); } }