Package com.google.gwt.core.ext

Examples of com.google.gwt.core.ext.PropertyOracle


*/
public class BrowserGenerator extends Generator {
  @Override
  public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
    TypeOracle oracle = context.getTypeOracle();
    PropertyOracle propOracle = context.getPropertyOracle();
   
    String ua = null;
    try {
      ua = propOracle.getSelectionProperty(logger, "user.agent").getCurrentValue();
    } catch (BadPropertyValueException e) {
      logger.log(TreeLogger.ERROR, "Can not resolve user.agent property", e);
      throw new UnableToCompleteException();
    }
   
View Full Code Here


  @Override
  public final String generate(TreeLogger logger, final GeneratorContext context,
      String typeName) throws UnableToCompleteException {
    TypeOracle typeOracle = context.getTypeOracle();
    // Get the current locale and interface type.
    PropertyOracle propertyOracle = context.getPropertyOracle();
    LocaleUtils.init(logger, propertyOracle);

    JClassType targetClass;
    try {
      targetClass = typeOracle.getType(typeName);
View Full Code Here

    RemoteServiceAsyncValidator rsav = new RemoteServiceAsyncValidator(logger,
        typeOracle);
    Map<JMethod, JMethod> syncMethToAsyncMethMap = rsav.validate(logger,
        serviceIntf, serviceAsync);

    final PropertyOracle propertyOracle = context.getPropertyOracle();

    // Load the blacklist/whitelist
    TypeFilter blacklistTypeFilter = new BlacklistTypeFilter(logger,
        propertyOracle);
View Full Code Here

  public final String generate(TreeLogger logger, GeneratorContext context,
      String typeName) throws UnableToCompleteException {
    assert CURRENCY_LIST.equals(typeName);
    TypeOracle typeOracle = context.getTypeOracle();

    PropertyOracle propertyOracle = context.getPropertyOracle();
    LocaleUtils.init(logger, propertyOracle);
    GwtLocale locale = LocaleUtils.getCompileLocale();
    Set<GwtLocale> runtimeLocales = LocaleUtils.getRuntimeLocales();

    JClassType targetClass;
View Full Code Here

      boolean reportErrors) throws UnableToCompleteException {
    logger = logger.branch(TreeLogger.DEBUG, "Finding resources");

    String locale;
    try {
      PropertyOracle oracle = context.getGeneratorContext().getPropertyOracle();
      SelectionProperty prop = oracle.getSelectionProperty(logger, "locale");
      locale = prop.getCurrentValue();
    } catch (BadPropertyValueException e) {
      locale = null;
    }
View Full Code Here

  @Override
  public void init(TreeLogger logger, ResourceContext context)
      throws UnableToCompleteException {
    String classPrefix;
    try {
      PropertyOracle propertyOracle = context.getGeneratorContext().getPropertyOracle();
      ConfigurationProperty styleProp = propertyOracle.getConfigurationProperty("CssResource.style");
      String style = styleProp.getValues().get(0);
      prettyOutput = style.equals("pretty");

      ConfigurationProperty mergeProp = propertyOracle.getConfigurationProperty("CssResource.mergeEnabled");
      String merge = mergeProp.getValues().get(0);
      enableMerge = merge.equals("true");

      ConfigurationProperty classPrefixProp = propertyOracle.getConfigurationProperty("CssResource.obfuscationPrefix");
      classPrefix = classPrefixProp.getValues().get(0);
    } catch (BadPropertyValueException e) {
      logger.log(TreeLogger.ERROR, "Unable to query module property", e);
      throw new UnableToCompleteException();
    }
View Full Code Here

      /*
       * Fall back to using the to-be-deprecated strictAccessor property.
       */
      try {
        PropertyOracle propertyOracle = context.getGeneratorContext().getPropertyOracle();
        ConfigurationProperty prop = propertyOracle.getConfigurationProperty("CssResource.strictAccessors");
        String propertyValue = prop.getValues().get(0);
        if (Boolean.valueOf(propertyValue)) {
          logger.log(TreeLogger.WARN,
              "CssResource.strictAccessors is true, but " + method.getName()
                  + "() is missing the @Strict annotation.");
View Full Code Here

            "[.$]", "_"));
    Set<String> permutationAxes = new HashSet<String>(requirements.axes);
    permutationAxes.add("locale");

    try {
      PropertyOracle oracle = context.getGeneratorContext().getPropertyOracle();
      for (String property : permutationAxes) {
        SelectionProperty prop = oracle.getSelectionProperty(logger, property);
        String value = prop.getCurrentValue();
        toReturn.append("_" + value);
      }
    } catch (BadPropertyValueException e) {
    }
View Full Code Here

  @Override
  protected String generate(TreeLogger logger, GeneratorContext context) {
    final ClassStructureBuilder<?> classBuilder = Implementations.extend(LessStyleMapping.class, GENERATED_CLASS_NAME);
    final ConstructorBlockBuilder<?> constructor = classBuilder.publicConstructor();
    final PropertyOracle oracle = context.getPropertyOracle();
    final LessStylesheetContext stylesheetContext = new LessStylesheetContext(logger, oracle);
    final Map<String, String> styleMapping = stylesheetContext.getStyleMapping();

    if (!styleMapping.isEmpty()) {
      for (Map.Entry<String, String> entry : styleMapping.entrySet()) {
View Full Code Here

    RemoteServiceAsyncValidator rsav = new RemoteServiceAsyncValidator(logger,
        typeOracle);
    Map<JMethod, JMethod> syncMethToAsyncMethMap = rsav.validate(logger,
        serviceIntf, serviceAsync);

    final PropertyOracle propertyOracle = context.getPropertyOracle();

    // Load the blacklist/whitelist
    TypeFilter blacklistTypeFilter = new BlacklistTypeFilter(logger,
        propertyOracle);
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.PropertyOracle

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.