PsiElement (YAMLValue yamlValue) { PsiReference reference = yamlValue instanceof YAMLAlias ? yamlValue.getReference() : null; PsiElement resolved = reference == null ? null : reference.resolve(); resolved = resolved == null ? null : resolved.getParent(); return resolved; }