Package com.google.gxp.compiler.parser

Examples of com.google.gxp.compiler.parser.Namespace


    assertNotEqual(pos1.getLine(), pos2.getLine());
    assertNotEqual(pos1.getColumn(), pos2.getColumn());
  }

  public void testAttr() throws Exception {
    Namespace namespace = NullNamespace.INSTANCE;
    String name = "foo";
    String value = "bar";

    ParsedAttribute result = parsedAttr(namespace, name, value);
View Full Code Here


  /**
   * Converts a {@code ParsedAttribute} into an {@code Attribute}.
   */
  private static Attribute convertAttribute(final AlertSink alertSink,
                                            final ParsedAttribute parsedAttr) {
    Namespace namespace = parsedAttr.getNamespace();
    return namespace.acceptVisitor(
        new NamespaceVisitor<Attribute>() {
          private Attribute defaultVisitNamespace(Namespace ns) {
            return new Attribute(parsedAttr, ns, parsedAttr.getName(),
                                 new StringConstant(parsedAttr, null, parsedAttr.getValue()));
          }
View Full Code Here

    List<Attribute> result = Lists.newArrayList();
    Set<String> usedLocalNames = Sets.newHashSet();

    for (AttributeName attrName : namesToAttrs.keySet()) {
      if (!used.contains(attrName)) {
        Namespace ns = attrName.getNamespace();
        String localName = attrName.getLocalName();
        if (!(ns instanceof OutputLanguageNamespace) && !(ns instanceof NullNamespace)) {
          used.add(attrName);
          result.add(namesToAttrs.get(attrName));
        } else if (!usedLocalNames.contains(localName)) {
View Full Code Here

  /**
   * Converts a {@code ParsedAttribute} into an {@code Attribute}.
   */
  private static Attribute convertAttribute(final AlertSink alertSink,
                                            final ParsedAttribute parsedAttr) {
    Namespace namespace = parsedAttr.getNamespace();
    return namespace.acceptVisitor(
        new NamespaceVisitor<Attribute>() {
          private Attribute defaultVisitNamespace(Namespace ns) {
            return new Attribute(parsedAttr, ns, parsedAttr.getName(),
                                 new StringConstant(parsedAttr, null, parsedAttr.getValue()));
          }
View Full Code Here

    List<Attribute> result = Lists.newArrayList();
    Set<String> usedLocalNames = Sets.newHashSet();

    for (AttributeName attrName : namesToAttrs.keySet()) {
      if (!used.contains(attrName)) {
        Namespace ns = attrName.getNamespace();
        String localName = attrName.getLocalName();
        if (!(ns instanceof OutputLanguageNamespace) && !(ns instanceof NullNamespace)) {
          used.add(attrName);
          result.add(namesToAttrs.get(attrName));
        } else if (!usedLocalNames.contains(localName)) {
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.parser.Namespace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.