DocumentationElement (@NotNull String fieldName, @NotNull PsiElement contextElement) { final YamlMetaTypeProvider typeProvider = getMetaTypeProvider(contextElement); if (typeProvider == null) { return null; } final YamlMetaTypeProvider.MetaTypeProxy proxy = typeProvider.getMetaTypeProxy(contextElement); if (proxy == null) { return null; } final Field field = proxy.getMetaType().findFeatureByName(fieldName); if (field == null) { return null; } return new DocumentationElement(contextElement.getManager(), proxy.getMetaType(), field); }