Package com.google.gwt.core.ext

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


    this.jprogram = jprogram;
    this.jsProgram = jsProgram;
    this.jjsmap = jjsmap;

    assert propertyOracles.length > 0;
    PropertyOracle oracle = propertyOracles[0];
    try {
      List<String> values = oracle.getConfigurationProperty(
          "compiler.emulatedStack.recordFileNames").getValues();
      recordFileNames = Boolean.valueOf(values.get(0));

      values = oracle.getConfigurationProperty(
          "compiler.emulatedStack.recordLineNumbers").getValues();
      recordLineNumbers = recordFileNames || Boolean.valueOf(values.get(0));
    } catch (BadPropertyValueException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
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 localeUtils = LocaleUtils.getInstance(logger, propertyOracle,
        context);
    GwtLocale locale = localeUtils.getCompileLocale();
    Set<GwtLocale> runtimeLocales = localeUtils.getRuntimeLocales();
View Full Code Here

    // agree with one another
    //
    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);

    // Determine the set of serializable types
View Full Code Here

   * @return the current locale
   */
  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

  @Override
  public void init(TreeLogger logger, ResourceContext context)
      throws UnableToCompleteException {
    String classPrefix;
    try {
      PropertyOracle propertyOracle =
        context.getGeneratorContext().getPropertyOracle();
      ConfigurationProperty styleProp =
        propertyOracle.getConfigurationProperty(KEY_STYLE);
      obfuscationStyle = CssObfuscationStyle.getObfuscationStyle(
          styleProp.getValues().get(0));

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

      ConfigurationProperty classPrefixProp =
        propertyOracle.getConfigurationProperty(KEY_OBFUSCATION_PREFIX);
      classPrefix = classPrefixProp.getValues().get(0);

      // add these configuration properties to our requirements
      ClientBundleRequirements requirements = context.getRequirements();
      requirements.addConfigurationProperty(KEY_STYLE);
View Full Code Here

    if (prop.getConditionalValues().size() == 1) {
      winner = prop.getRootCondition();
    } else {
      BindingProperty[] answerable = new BindingProperty[soFar.length];
      System.arraycopy(properties, 0, answerable, 0, soFar.length);
      PropertyOracle propertyOracle = new StaticPropertyOracle(answerable,
          soFar, new ConfigurationProperty[0]);

      for (Condition cond : prop.getConditionalValues().keySet()) {
        try {
          if (cond.isTrue(TreeLogger.NULL, new DeferredBindingQuery(
View Full Code Here

  }

  private SelectionProperty getSelectionProperty(TreeLogger logger, GeneratorContext context, String propertyName)
      throws UnableToCompleteException {
    // get the property oracle
    PropertyOracle propertyOracle = context.getPropertyOracle();
    SelectionProperty property = null;
    try {
      // get mgwt.os variable
      property = propertyOracle.getSelectionProperty(logger, propertyName);
    } catch (BadPropertyValueException e) {
      // if we can`t find it die
      logger.log(TreeLogger.ERROR, "can not resolve " + propertyName + " variable", e);
      throw new UnableToCompleteException();
    }
View Full Code Here

  @Override
  public String generate(TreeLogger logger, GeneratorContext context, String typeName)
      throws UnableToCompleteException {
    // get the property oracle
    PropertyOracle propertyOracle = context.getPropertyOracle();
    String enablePropertyValue = getSingleValue(propertyOracle, KEY_ENABLED, logger);

    if (!"true".equals(enablePropertyValue)) {
      return StyleSheetUrlHolderNoopImpl.class.getName();
    }
View Full Code Here

public class SuperDevModeGenerator extends Generator{

  @Override
  public String generate(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {
    // get the property oracle
    PropertyOracle propertyOracle = context.getPropertyOracle();
    ConfigurationProperty property = null;
    try {
      // get mgwt.superdevmode variable
      property = propertyOracle.getConfigurationProperty("mgwt.superdevmode");
    } catch (BadPropertyValueException e) {
      // if we can`t find it die
      logger.log(TreeLogger.ERROR, "can not resolve mgwt.superdevmode variable", e);
      throw new UnableToCompleteException();
    }

    ConfigurationProperty superDevModeServer = null;
    try {
      // get mgwt.superdevmode variable
      superDevModeServer = propertyOracle.getConfigurationProperty("mgwt.superdevmode_host");
    } catch (BadPropertyValueException e) {
      // if we can`t find it die
      logger.log(TreeLogger.INFO, "can not resolve mgwt.superdevmode_host variable - using default - http://<server>:9876", e);
    }
View Full Code Here

      ResourceFactory.clearCache();
      lastReloadCount = typeOracle.getReloadCount();
    }

    // Get the current locale and interface type.
    PropertyOracle propertyOracle = context.getPropertyOracle();
    Locale locale;
    try {
      String localeID = propertyOracle.getPropertyValue(logger, PROP_LOCALE);
      if ("default".equals(localeID)) {
        locale = null;
      } else {
        String[] localeChunks = localeID.split("_");
        if (localeChunks.length > 0) {
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.