boolean (@NotNull HighlightInfo highlightInfo, @Nullable PsiFile file) { if (null == file) { return true; } Project project = file.getProject(); if (!LombokLibraryUtil.hasLombokLibrary(project)) { return true; } PsiElement highlightedElement = file.findElementAt(highlightInfo.getStartOffset()); if (null == highlightedElement) { return true; } // check exceptions for highlights boolean acceptHighlight = Holder.registeredFilters .getOrDefault(highlightInfo.getSeverity(), Collections.emptyMap()) .getOrDefault(highlightInfo.type.getAttributesKey(), Collections.emptyList()) .stream() .filter(filter -> filter.descriptionCheck(highlightInfo.getDescription(), highlightedElement)) .allMatch(filter -> filter.accept(highlightedElement)); // check if highlight was filtered if (!acceptHighlight) { return false; } // handle rest cases String description = highlightInfo.getDescription(); if (HighlightSeverity.ERROR.equals(highlightInfo.getSeverity())) { //Handling onX parameters if (OnXAnnotationHandler.isOnXParameterAnnotation(highlightInfo, file) || OnXAnnotationHandler.isOnXParameterValue(highlightInfo, file) || (description != null && Holder.LOMBOK_ANY_ANNOTATION_REQUIRED.matcher(description).matches())) { return false; } } // register different quick fix for highlight Holder.registeredHooks .getOrDefault(highlightInfo.getSeverity(), Collections.emptyMap()) .getOrDefault(highlightInfo.type.getAttributesKey(), Collections.emptyList()) .stream() .filter(filter -> filter.descriptionCheck(highlightInfo.getDescription())) .forEach(filter -> filter.processHook(highlightedElement, highlightInfo)); return true; }