Search in sources :

Example 6 with Attribute

use of org.sonar.plugins.web.node.Attribute in project sonar-web by SonarSource.

the class ElementTokenizer method handleBeforeAttributeName.

private static void handleBeforeAttributeName(CodeReader codeReader, TagNode element) {
    Attribute attribute;
    StringBuilder sbQName = new StringBuilder();
    codeReader.popTo(endQNameMatcher, sbQName);
    attribute = new Attribute(sbQName.toString().trim());
    attribute.setLine(codeReader.getLinePosition() + element.getStartLinePosition() - 1);
    element.getAttributes().add(attribute);
}
Also used : Attribute(org.sonar.plugins.web.node.Attribute)

Aggregations

Attribute (org.sonar.plugins.web.node.Attribute)6 StringReader (java.io.StringReader)2 Node (org.sonar.plugins.web.node.Node)2 TagNode (org.sonar.plugins.web.node.TagNode)2 IOException (java.io.IOException)1 StreamTokenizer (java.io.StreamTokenizer)1 Test (org.junit.Test)1 CommentNode (org.sonar.plugins.web.node.CommentNode)1 DirectiveNode (org.sonar.plugins.web.node.DirectiveNode)1 TextNode (org.sonar.plugins.web.node.TextNode)1