Search in sources :

Example 1 with SChildBearingNode

use of org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SChildBearingNode in project sts4 by spring-projects.

the class YamlCompletionEngine method isLesserIndentRelaxable.

protected final boolean isLesserIndentRelaxable(final SNode currentNode, final SNode contextNode) {
    if (!options.includeDeindentedProposals()) {
        return false;
    }
    SChildBearingNode parent = currentNode.getParent();
    while (parent != null && parent != contextNode) {
        SNode lastChild = parent.getLastRealChild();
        if (lastChild != null && lastChild.getStart() >= currentNode.getNodeEnd()) {
            return false;
        }
        parent = parent.getParent();
    }
    return true;
}
Also used : SNode(org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SNode) SChildBearingNode(org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SChildBearingNode)

Aggregations

SChildBearingNode (org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SChildBearingNode)1 SNode (org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SNode)1