DocumentationElement (@NotNull ForcedCompletionPath path, @NotNull PsiElement contextElement) { final YamlMetaTypeProvider typeProvider = getMetaTypeProvider(contextElement); if (typeProvider == null) { return null; } final Field field = path.getFinalizingField(); if (field == null) { return null; } YamlMetaType type = path.getFinalizingType(); if (type == null) { final YamlMetaTypeProvider.MetaTypeProxy proxy = typeProvider.getMetaTypeProxy(contextElement); if (proxy == null) { return null; } type = proxy.getMetaType(); } return new DocumentationElement(contextElement.getManager(), type, field); }