Package com.google.gwt.core.ext

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


   * @param logger
   * @param propertyOracle
   */
  public static void init(TreeLogger logger, PropertyOracle propertyOracle) {
    try {
      SelectionProperty localeProp
          = propertyOracle.getSelectionProperty(logger, PROP_LOCALE);
      String localeName = localeProp.getCurrentValue();
      SortedSet<String> localeValues = localeProp.getPossibleValues();

      GwtLocale newCompileLocale = factory.fromString(localeName);
      if (newCompileLocale.equals(compileLocale)) {
        return;
      }
View Full Code Here


    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;
    }

    checkForDeprecatedAnnotations(logger, method);
View Full Code Here

    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

  }

  private static boolean getBooleanProperty(TreeLogger logger,
      PropertyOracle propertyOracle, String propertyName, boolean defaultValue) {
    try {
      SelectionProperty prop
         = propertyOracle.getSelectionProperty(logger, propertyName);
      String propVal = prop.getCurrentValue();
      if (propVal != null && propVal.length() > 0) {
        return Boolean.valueOf(propVal);
      }
    } catch (BadPropertyValueException e) {
      // Just return the default value.
View Full Code Here

      // Work around an IE7 bug,
      // http://code.google.com/p/google-web-toolkit/issues/detail?id=1440
      // note, JsIEBlockTextTransformer now handles restructuring top level
      // blocks, this class now handles non-top level blocks only.
      SelectionProperty userAgentProperty = null;
      for (PropertyOracle oracle : propertyOracles) {
        try {
          userAgentProperty = oracle.getSelectionProperty(logger, "user.agent");
        } catch (BadPropertyValueException e) {
          break;
        }
      }
      // if user agent is known or ie6, split overly large blocks
      boolean splitBlocks = userAgentProperty == null
          || ("ie6".equals(userAgentProperty.getCurrentValue()));

      if (splitBlocks) {
        JsIEBlockSizeVisitor.exec(jsProgram);
      }
      JsBreakUpLargeVarStatements.exec(jsProgram, propertyOracles);
View Full Code Here

   * @return LocaleUtils instance
   */
  public static LocaleUtils getInstance(TreeLogger logger,
      PropertyOracle propertyOracle) {
    try {
      SelectionProperty localeProp
          = propertyOracle.getSelectionProperty(logger, PROP_LOCALE);
      ConfigurationProperty runtimeLocaleProp
          = propertyOracle.getConfigurationProperty(PROP_RUNTIME_LOCALES);
      CacheKey key = new CacheKey(localeProp, runtimeLocaleProp);
      synchronized (cacheLock) {
View Full Code Here

    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

    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;
    }

    checkForDeprecatedAnnotations(logger, method);
View Full Code Here

   */
  private static String getLocale(TreeLogger logger, GeneratorContext genContext) {
    String locale;
    try {
      PropertyOracle oracle = genContext.getPropertyOracle();
      SelectionProperty prop = oracle.getSelectionProperty(logger, "locale");
      locale = prop.getCurrentValue();
    } catch (BadPropertyValueException e) {
      locale = null;
    }
    return locale;
  }
View Full Code Here

        for (String genLocale : genLocales) {
          if (GwtLocale.DEFAULT_LOCALE.equals(genLocale)) {
            // Locale "default" gets special handling because of property
            // fallbacks; "default" might be mapped to any real locale.
            try {
              SelectionProperty localeProp = context.getPropertyOracle()
                  .getSelectionProperty(logger, "locale");
              String defaultLocale = localeProp.getFallbackValue();
              if (defaultLocale.length() > 0) {
                genLocale = defaultLocale;
              }
            } catch (BadPropertyValueException e) {
              throw error(logger, "Could not get 'locale' property");
View Full Code Here

TOP

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

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.