Examples of ContentType


Examples of com.google.gwt.gadgets.client.Gadget.ContentType

      for (Class<? extends ContentSection<?>> contentSectionClass : content.contents()) {
        String viewTypeName = contentSectionClass.getName().replaceAll("\\$",
            ".");
        JClassType viewType = typeOracle.findType(viewTypeName);
        if (viewType != null) {
          ContentType contentType = viewType.getAnnotation(ContentType.class);
          result.add(new GadgetViewType(contentType.views(), viewType));
        } else {
          logger.log(TreeLogger.ERROR, "Unable to find view type: "
              + viewTypeName);
          throw new UnableToCompleteException();
        }
View Full Code Here

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

  public Schema schema(String contentType) {
    return new BuiltinSchemaFactory().fromContentTypeName(contentType);
  }

  public ContentType htmlContentType() {
    return new ContentType(pos(), "html", htmlSchema());
  }
View Full Code Here

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

        alertSink.add(new UnknownContentTypeError(node, contentType));
      }

      return (schema == null)
          ? null
          : new ContentType(node.getSourcePosition(),
                            node.getDisplayName(),
                            schema);
    }
View Full Code Here

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

      if (consumesContent) {
        if (!"*".equals(content)) {
          alertSink.add(new InvalidAttributeValueError(attrMap.getAttribute("content")));
        }
        if (rootSchema != null) {
          defaultType = new ContentType(node.getSourcePosition(),
                                        node.getDisplayName(),
                                        rootSchema);
        }
      }

View Full Code Here

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

    public Void visitTemplateElement(GxpNamespace.GxpElement node) {
      TemplateName.FullyQualified name = createRootName(node);

      AttributeMap attrMap = nodeParts.getAttributes();

      ContentType contentType = createContentType(node, DEFAULT_CONTENT_TYPE);

      List<Constructor> constructors = nodeParts.getConstructors();
      Constructor constructor = constructors.isEmpty()
          ? Constructor.empty(node) : constructors.get(0);

      if (constructors.size() > 1) {
        alertSink.add(new MoreThanOneConstructorError(constructors.get(1)));
      }

      List<JavaAnnotation> javaAnnotations = getJavaAnnotations(node,
                                                                JavaAnnotation.Element.CLASS,
                                                                JavaAnnotation.Element.INSTANCE,
                                                                JavaAnnotation.Element.INTERFACE);

      List<Import> imports = nodeParts.getImports();
      List<ImplementsDeclaration> implementsDeclarations = nodeParts.getImplementsDeclarations();
      List<ThrowsDeclaration> throwsDeclarations = nodeParts.getThrowsDeclarations();
      List<Parameter> parameters = nodeParts.getParameters();
      List<FormalTypeParameter> formalTypeParameters = nodeParts.getFormalTypeParameters();
      Expression content = getCollapsableContent(attrMap);

      if (contentType != null) {
        output.accumulate(new Template(node,
                                       name,
                                       contentType.getSchema(),
                                       javaAnnotations,
                                       constructor,
                                       imports,
                                       implementsDeclarations,
                                       throwsDeclarations,
View Full Code Here

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

      String comment = attrMap.getOptional("comment", null);
      boolean hidden = attrMap.getBooleanValue("hidden");
      // TODO(laurence): coerce content to HTML
      Expression content = getCollapsableContent(attrMap);

      ContentType contentType = createContentType(node, null);
      Schema schema = (contentType == null) ? null : contentType.getSchema();

      output.accumulate(
          new UnextractedMessage(node, schema, name, meaning, comment, hidden, content));
      return null;
    }
View Full Code Here

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

        alertSink.add(new UnknownContentTypeError(node, contentType));
      }

      return (schema == null)
          ? null
          : new ContentType(node.getSourcePosition(),
                            node.getDisplayName(),
                            schema);
    }
View Full Code Here

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

      if (consumesContent) {
        if (!"*".equals(content)) {
          alertSink.add(new InvalidAttributeValueError(attrMap.getAttribute("content")));
        }
        if (rootSchema != null) {
          defaultType = new ContentType(node.getSourcePosition(),
                                        node.getDisplayName(),
                                        rootSchema);
        }
      }

View Full Code Here

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

    public Void visitTemplateElement(GxpNamespace.GxpElement node) {
      TemplateName.FullyQualified name = createRootName(node);

      AttributeMap attrMap = nodeParts.getAttributes();

      ContentType contentType = createContentType(node, DEFAULT_CONTENT_TYPE);

      List<Constructor> constructors = nodeParts.getConstructors();
      Constructor constructor = constructors.isEmpty()
          ? Constructor.empty(node) : constructors.get(0);

      if (constructors.size() > 1) {
        alertSink.add(new MoreThanOneConstructorError(constructors.get(1)));
      }

      List<JavaAnnotation> javaAnnotations = getJavaAnnotations(node,
                                                                JavaAnnotation.Element.CLASS,
                                                                JavaAnnotation.Element.INSTANCE,
                                                                JavaAnnotation.Element.INTERFACE);

      List<Import> imports = nodeParts.getImports();
      List<ImplementsDeclaration> implementsDeclarations = nodeParts.getImplementsDeclarations();
      List<ThrowsDeclaration> throwsDeclarations = nodeParts.getThrowsDeclarations();
      List<Parameter> parameters = nodeParts.getParameters();
      List<FormalTypeParameter> formalTypeParameters = nodeParts.getFormalTypeParameters();
      Expression content = getCollapsableContent(attrMap);

      if (contentType != null) {
        output.accumulate(new Template(node,
                                       name,
                                       contentType.getSchema(),
                                       javaAnnotations,
                                       constructor,
                                       imports,
                                       implementsDeclarations,
                                       throwsDeclarations,
View Full Code Here

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

      String comment = attrMap.getOptional("comment", null);
      boolean hidden = attrMap.getBooleanValue("hidden");
      // TODO(laurence): coerce content to HTML
      Expression content = getCollapsableContent(attrMap);

      ContentType contentType = createContentType(node, null);
      Schema schema = (contentType == null) ? null : contentType.getSchema();

      output.accumulate(
          new UnextractedMessage(node, schema, name, meaning, comment, hidden, content));
      return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.