else if (node.getSemanticElement() instanceof Doku) {
acceptor.addPosition(node.getOffset(), node.getLength(), CssExtHighlightingConfiguration.CSSDOC_ID);
}
else if (node.getSemanticElement() instanceof ElementDefinition) {
ElementDefinition el = (ElementDefinition) node.getSemanticElement();
BidiTreeIterator<INode> innerIt = node.getAsTreeIterable().iterator();
while(innerIt.hasNext()) {
INode n = innerIt.next();
if (n.getText().equals(el.getName())) {
acceptor.addPosition(n.getOffset(), n.getLength(), CssExtHighlightingConfiguration.ELEMENT_ID);
break;
}
}
}
else if (node.getSemanticElement() instanceof PseudoClassDefinition) {
acceptor.addPosition(node.getOffset(), node.getLength(), CssExtHighlightingConfiguration.ELEMENT_ID);
}
else if (node.getSemanticElement() instanceof PropertyDefinition) {
PropertyDefinition el = (PropertyDefinition) node.getSemanticElement();
BidiTreeIterator<INode> innerIt = node.getAsTreeIterable().iterator();
while(innerIt.hasNext()) {
INode n = innerIt.next();
if (n.getText().equals(el.getName())) {
acceptor.addPosition(n.getOffset(), n.getLength(), CssExtHighlightingConfiguration.PROPERTY_ID);
break;
}
}
}
else if (node.getSemanticElement() instanceof CSSRuleDefinition) {
CSSRuleDefinition el = (CSSRuleDefinition) node.getSemanticElement();
BidiTreeIterator<INode> innerIt = node.getAsTreeIterable().iterator();
while(innerIt.hasNext()) {
INode n = innerIt.next();
if (n.getText().equals(el.getName())) {
acceptor.addPosition(n.getOffset(), n.getLength(), CssExtHighlightingConfiguration.RULE_ID);
break;
}
}
// acceptor.addPosition(node.getOffset(), node.getLength(), CssExtHighlightingConfiguration.RULE_ID);