void (@NotNull BranchBase<?> duplicate, @NotNull @InspectionMessage String message, @NotNull DuplicateBranchesInSwitchInspection.LevelType state, @NotNull LocalQuickFix @NotNull ... fixes) { PsiElement[] elements = duplicate.myStatements; if (state == LevelType.NO) { return; } if (state == LevelType.INFO && !myHolder.isOnTheFly()) { return; } InspectionManager inspectionManager = InspectionManager.getInstance(myHolder.getProject()); ProblemDescriptor descriptor; if (state == LevelType.INFO) { descriptor = inspectionManager .createProblemDescriptor(elements[0], elements[elements.length - 1], message, ProblemHighlightType.INFORMATION, myHolder.isOnTheFly(), fixes); } else { descriptor = inspectionManager .createProblemDescriptor(elements[0], message, myHolder.isOnTheFly(), fixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); } myHolder.registerProblem(descriptor); }