PsiElement () { PsiElement colon = findChildByType(YAMLTokenTypes.COLON); if (colon == null) { return null; } ASTNode node = colon.getNode(); do { node = node.getTreePrev(); } while(YAMLElementTypes.BLANK_ELEMENTS.contains(PsiUtilCore.getElementType(node))); if (node == null || PsiUtilCore.getElementType(node) == YAMLTokenTypes.QUESTION) { return null; } else { return node.getPsi(); } }