void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (!(element instanceof Property property)) return; PropertiesFile propertiesFile = property.getPropertiesFile(); final String key = property.getUnescapedKey(); if (key == null) return; Collection<IProperty> others = propertiesFile.findPropertiesByKey(key); ASTNode keyNode = ((PropertyImpl)property).getKeyNode(); if (keyNode == null) return; if (others.size() != 1 && EP_NAME.findFirstSafe(suppressor -> suppressor.suppressAnnotationFor(property)) == null) { holder.newAnnotation(HighlightSeverity.ERROR,PropertiesBundle.message("duplicate.property.key.error.message")).range(keyNode) .withFix(PropertiesQuickFixFactory.getInstance().createRemovePropertyFix(property)).create(); } highlightTokens(keyNode, holder, new PropertiesHighlighter()); ASTNode valueNode = ((PropertyImpl)property).getValueNode(); if (valueNode != null) { highlightTokens(valueNode, holder, new PropertiesValueHighlighter()); } }