Package com.google.gwt.gadgets.client.GadgetFeature

Examples of com.google.gwt.gadgets.client.GadgetFeature.FeatureName


      TypeOracle typeOracle, SourceWriter sw, JClassType gadgetType,
      JClassType featureType) throws UnableToCompleteException {
    logger = logger.branch(TreeLogger.DEBUG,
        "Generating GadgetFeature initializer for type "
            + featureType.getQualifiedSourceName(), null);
    FeatureName name = featureType.getAnnotation(FeatureName.class);
    if (name == null) {
      return;
    }

    JMethod[] methods = featureType.getMethods();
View Full Code Here


    }

    // Add required features to the manifest
    // <require feature="someFeature" />
    for (JClassType interfaceType : type.getImplementedInterfaces()) {
      FeatureName name = interfaceType.getAnnotation(FeatureName.class);
      if (name != null) {
        for (String feature : name.value()) {
          // Skip features defined to be implicitly available in the container
          if (FeatureName.INTRINSIC.equals(feature)) {
            continue;
          }
          Element require = (Element) modulePrefs.appendChild(d.createElement("Require"));
          require.setAttribute("feature", feature);
        }
      }

      GadgetUtils.writeRequirementsToElement(logger, d, modulePrefs,
          name.requirements());
    }

    // The Gadget linker will fill in the bootstrap
    // <content type="html">
    Element content = (Element) module.appendChild(d.createElement("Content"));
View Full Code Here

        JClassType featureType = interfaceType;

        TreeLogger branchedLogger = logger.branch(TreeLogger.DEBUG,
            "Generating GadgetFeature initializer for type "
                + featureType.getQualifiedSourceName(), null);
        FeatureName name = featureType.getAnnotation(FeatureName.class);
        if (name == null) {
          continue;
        }

        JMethod[] methods = featureType.getMethods();
View Full Code Here

    // Add required features to the manifest
    // <require feature="someFeature" />
    for (JClassType currentClass = type; currentClass != null; currentClass = currentClass.getSuperclass()) {
      for (JClassType interfaceType : currentClass.getImplementedInterfaces()) {
        FeatureName name = interfaceType.getAnnotation(FeatureName.class);
        if (name != null) {
          for (String feature : name.value()) {
            // Skip features defined to be implicitly available in the container
            if (FeatureName.INTRINSIC.equals(feature)) {
              continue;
            }
            Element require = (Element) modulePrefs.appendChild(d.createElement("Require"));
            require.setAttribute("feature", feature);
          }
          GadgetUtils.writeRequirementsToElement(logger, d, modulePrefs,
              name.requirements());
        }
      }
    }

    // Generate and append the Content section(s).
View Full Code Here

TOP

Related Classes of com.google.gwt.gadgets.client.GadgetFeature.FeatureName

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.