Collection<StructureViewTreeElement> (@NotNull TreeElement node) { PsiElement psiElem; String details; if (node instanceof DuplicatedPsiTreeElementBase) { DuplicatedPsiTreeElementBase yamlNode = (DuplicatedPsiTreeElementBase)node; psiElem = yamlNode.getElement(); details = yamlNode.getDetails(); } else if (node instanceof PsiTreeElementBase) { PsiTreeElementBase yamlNode = (PsiTreeElementBase)node; psiElem = yamlNode.getElement(); if (psiElem == null) { // not sure it is possible return Collections.emptyList(); } details = calculateStartPath(psiElem); } else { return Collections.emptyList(); } YAMLPsiElement yamlElem = psiElem instanceof YAMLPsiElement ? (YAMLPsiElement)psiElem : null; YAMLValue value = getContainedValue(yamlElem); if (!(value instanceof YAMLAlias)) { return Collections.emptyList(); } return YAMLStructureViewFactory.createChildrenViewTreeElements(resolveAlias((YAMLAlias)value), details); }