Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.TemplateName


        } else {
          alertSink.add(new UnknownAttributeError(node, attr));
        }
      }

      TemplateName callee = TemplateName.parseDottedName(alertSink,
                                                         node.getSourcePosition(),
                                                         node.getTagName());

      if (callee.isValid()) {
        // TODO(laurence): if callee == null then substitute good one
        output.accumulate(
            new UnboundCall(node.getSourcePosition(),
                            node.getDisplayName(),
                            callee,
View Full Code Here


    private static final String HEADER_FORMAT = loadFormat("header");

    protected void appendHeader(Root root) {
      super.appendHeader(root);
      TemplateName name = root.getName();
      String sourceName = root.getSourcePosition().getSourceName();
      String packageName = (name == null) ? "" : name.getPackageName();

      // passing a null SourcePosition insures that we never get tail comments
      formatLine((SourcePosition)null, HEADER_FORMAT, sourceName, packageName);
    }
View Full Code Here

        NativeType type = new NativeType(node, interfaceType);
        output.accumulate(new NativeImplementsDeclaration(node, type));
      } else {
        interfaceType = attrMap.get("interface", null);
        if (interfaceType != null) {
          TemplateName templateName = TemplateName.create(null, interfaceType);
          output.accumulate(new UnboundImplementsDeclaration(node, templateName));
        }
      }
      return null;
    }
View Full Code Here

    public Void visitThrowsElement(GxpNamespace.GxpElement node) {
      AttributeMap attrMap = nodeParts.getAttributes();
      String exceptionType = attrMap.get("exception", null);
      if (exceptionType != null) {
        TemplateName exception =
            TemplateName.parseDottedName(
                alertSink, node.getSourcePosition(), exceptionType);
        if (exception != null) {
          // TODO(harryh): exceptionType should be a NativeType, not just
          //               a String
View Full Code Here

        } else {
          alertSink.add(new UnknownAttributeError(node, attr));
        }
      }

      TemplateName callee = TemplateName.parseDottedName(alertSink,
                                                         node.getSourcePosition(),
                                                         node.getTagName());

      if (callee.isValid()) {
        // TODO(laurence): if callee == null then substitute good one
        output.accumulate(
            new UnboundCall(node.getSourcePosition(),
                            node.getDisplayName(),
                            callee,
View Full Code Here

    private static final String HEADER_FORMAT = loadFormat("header");

    protected void appendHeader(Root root) {
      super.appendHeader(root);
      TemplateName name = root.getName();
      String sourceName = root.getSourcePosition().getSourceName();
      String packageName = (name == null) ? "" : name.getPackageName();

      // passing a null SourcePosition insures that we never get tail comments
      formatLine((SourcePosition)null, HEADER_FORMAT, sourceName, packageName);
    }
View Full Code Here

    }

    // TODO(harryh): factor common code to base class
    @Override
    protected void appendClass() {
      TemplateName templateName = template.getName();
      appendAnnotations(template.getJavaAnnotations(JavaAnnotation.Element.CLASS));
      formatLine(template.getSourcePosition(), "public class %s extends %s {",
                 getClassName(templateName), getBaseClassName());
      appendStaticContent();
      appendWriteMethod();
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.TemplateName

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.