void (@NotNull PsiElement element, @NotNull AnnotationHolder holder) { if (!(element instanceof JsonProperty property)) return; if (!ThemeJsonUtil.isThemeFilename(holder.getCurrentAnnotationSession().getFile().getName())) return; if (property.getValue() instanceof JsonObject) return; // do not check intermediary keys if (!ThemeJsonUtil.isInsideUiProperty(property)) return; final Pair<UIThemeMetadata, UIThemeMetadata.UIKeyMetadata> pair = ThemeJsonUtil.findMetadata(property); if (pair == null) { String parentNames = ThemeJsonUtil.getParentNames(property); if (parentNames.startsWith("*")) return; // anything allowed String fullKey = parentNames.isEmpty() ? property.getName() : parentNames + "." + property.getName(); holder.newAnnotation(HighlightSeverity.WARNING, DevKitThemesBundle.message("theme.highlighting.unresolved.key", fullKey)) .range(property.getNameElement()) .highlightType(ProblemHighlightType.WARNING).create(); return; } if (pair.second.isDeprecated()) { holder.newAnnotation(HighlightSeverity.WARNING, DevKitThemesBundle.message("theme.highlighting.deprecated.key", pair.second.getKey())) .range(property.getNameElement()) .highlightType(ProblemHighlightType.LIKE_DEPRECATED).create(); } }