void (@NotNull PsiElement location, @InspectionMessage @NotNull String description, @NotNull LocalQuickFix @Nullable [] fixes, ProblemHighlightType highlightType) { if (FileTypeInspectionDisablerKt.isTypecheckingDisabled(location.getContainingFile())) { return; } if (CompileStaticUtil.isCompileStatic(location)) { // filter all errors here, error will be highlighted by annotator if (highlightType != ProblemHighlightType.GENERIC_ERROR) { super.registerError(location, description, fixes, highlightType); } } else { if (highlightType == ProblemHighlightType.GENERIC_ERROR) { // if this visitor works within non-static context we will highlight all errors as warnings super.registerError(location, description, fixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING); } else { // if this visitor works within static context errors will be highlighted as errors by annotator, warnings will be highlighted as warnings here super.registerError(location, description, fixes, highlightType); } } }