ProblemDescriptor (@NotNull InspectionManager manager, PsiElement problemElement, PsiClass usageClass) { final String message = (usageClass instanceof PsiAnonymousClass anonymousClass) ? InspectionGadgetsBundle.message("static.method.only.used.in.one.anonymous.class.problem.descriptor", (problemElement.getParent() instanceof PsiMethod) ? 1 : 2, anonymousClass.getBaseClassReference().getText()) : InspectionGadgetsBundle.message("static.method.only.used.in.one.class.problem.descriptor", (problemElement.getParent() instanceof PsiMethod) ? 1 : 2, usageClass.getName()); return manager.createProblemDescriptor(problemElement, message, false, null, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); }