Package com.google.gwt.core.ext

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


   * Look up in the specified property oracle the maximum number of variables to
   * allow per var statement.
   */
  private int getMaxVarsPerStatement(PropertyOracle propertyOracle)
      throws InternalCompilerException, NumberFormatException {
    ConfigurationProperty prop;
    try {
      prop = propertyOracle.getConfigurationProperty(CONFIG_PROP_MAX_VARS);
    } catch (BadPropertyValueException e) {
      throw new InternalCompilerException("Could not find property "
          + CONFIG_PROP_MAX_VARS, e);
    }
    int t = Integer.parseInt(prop.getValues().get(0));
    return t;
  }
View Full Code Here


      try {
        SelectionProperty prop = propertyOracle.getSelectionProperty(logger,
            propName);
        testValue = prop.getCurrentValue();
      } catch (BadPropertyValueException e) {
        ConfigurationProperty prop = propertyOracle.getConfigurationProperty(propName);
        testValue = prop.getValues().get(0);
      }
      logger.log(TreeLogger.DEBUG, "Property value is '" + testValue + "'",
          null);
      if (testValue.equals(value)) {
        return true;
View Full Code Here

    private String failSafeGetProperty(PropertyOracle propertyOracle, String name, String defaultValue)
    {
        String value = defaultValue;
        try
        {
            ConfigurationProperty property = propertyOracle.getConfigurationProperty(name);
            if (property != null)
            {
                List<String> values = property.getValues();
                if (values != null && !values.isEmpty())
                {
                    value = values.get(0);
                }
            }
View Full Code Here

  private final ArrayList<Pattern> typePatterns;
  private final ArrayList<Boolean> includeType;

  public RegexFilter(TreeLogger logger, List<String> values)
      throws UnableToCompleteException {
    ConfigurationProperty prop;
    this.values = values;
    int size = values.size();
    typePatterns = new ArrayList<Pattern>(size);
    includeType = new ArrayList<Boolean>(size);
View Full Code Here

    addRoots(logger, typeOracle, typesSentFromBrowserBuilder,
        typesSentToBrowserBuilder);

    try {
      ConfigurationProperty prop = context.getPropertyOracle().getConfigurationProperty(
          TypeSerializerCreator.GWT_ELIDE_TYPE_NAMES_FROM_RPC);
      elideTypeNames = Boolean.parseBoolean(prop.getValues().get(0));
    } catch (BadPropertyValueException e) {
      logger.log(TreeLogger.ERROR, "Configuration property "
          + TypeSerializerCreator.GWT_ELIDE_TYPE_NAMES_FROM_RPC
          + " is not defined. Is RemoteService.gwt.xml inherited?");
      throw new UnableToCompleteException();
View Full Code Here

  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

    // filter reflection scope based on configuration in gwt xml module
    boolean keep = false;
    String name = type.getQualifiedSourceName();
    try {
      ConfigurationProperty prop;
      keep |= !name.contains(".");
      prop = context.getPropertyOracle().getConfigurationProperty("artemis.reflect.include");
      for (String s : prop.getValues())
        keep |= name.contains(s);
      prop = context.getPropertyOracle().getConfigurationProperty("artemis.reflect.exclude");
      for (String s : prop.getValues())
        keep &= !name.equals(s);
    } catch (BadPropertyValueException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

  protected boolean isCrux2OldInterfacesCompatibilityEnabled()
    {//TODO remover isso
    String value;
    try
        {
          ConfigurationProperty property = context.getPropertyOracle().getConfigurationProperty("enableCrux2OldInterfacesCompatibility");
          List<String> values = property.getValues();
          if (values != null && values.size() > 0)
          {
            value = values.get(0);
          }
          else
View Full Code Here

   * property.
   * @return a Set of Strings, or null.
   */
  static Set<String> getEnhancedTypes(PropertyOracle propertyOracle) {
    try {
      ConfigurationProperty prop = propertyOracle.getConfigurationProperty(RPC_ENHANCED_CLASSES);
      return Collections.unmodifiableSet(new HashSet<String>(prop.getValues()));
    } catch (BadPropertyValueException e) {
      return null;
    }
  }
View Full Code Here

        sourceWriter.outdent();
        sourceWriter.println("}");
    }

    private String failFastGetProperty(PropertyOracle propertyOracle, String name) throws BadPropertyValueException {
        ConfigurationProperty property = propertyOracle.getConfigurationProperty(name);
        if (property != null) {
            List<String> values = property.getValues();
            if (values != null && !values.isEmpty()) {
                return values.get(0);
            } else {
                throw new BadPropertyValueException("Missing configuration property '" + name + "'!");
            }
View Full Code Here

TOP

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

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.