Example usage for com.google.gwt.core.ext.linker SelectionProperty getName

List of usage examples for com.google.gwt.core.ext.linker SelectionProperty getName

Introduction

In this page you can find the example usage for com.google.gwt.core.ext.linker SelectionProperty getName.

Prototype

String getName();

Source Link

Document

Returns the name of the deferred binding property.

Usage

From source file:com.arcbees.chosen.rebind.VersionInspectorLinker.java

License:Apache License

private boolean isSuperDevMode(LinkerContext context) {
    boolean isSdm = false;

    for (SelectionProperty property : context.getProperties()) {
        if ("superdevmode".equals(property.getName())) {
            isSdm = "on".equals(property.tryGetValue());
            break;
        }//  www.  ja va  2 s  .com
    }

    return isSdm;
}

From source file:gwt.ns.webworker.linker.WorkerModuleLinker.java

License:Apache License

/**
 * Output the deferred binding properties to the logger to help the user of
 * this linker determine what is causing multiple compilation permutations.
 * /*from   w  w w  . ja  v  a 2s  .c o m*/
 * @param logger the TreeLogger to record to
 * @param properties The deferred binding properties
 */
protected void logPermutationProperties(TreeLogger logger, SortedSet<SelectionProperty> properties) {
    logger.log(TreeLogger.INFO, "Deferred binding properties of current " + "module:");
    for (SelectionProperty property : properties) {
        String name = property.getName();
        String value = property.tryGetValue();
        if (value == null) {
            value = "**Varies. Probable cause of multiple permutations.**";
        } else {
            value = value + ". (constant)";
        }

        logger.log(TreeLogger.INFO, "Property Name: " + name);
        logger.log(TreeLogger.INFO, "        Value: " + value);
    }
}

From source file:org.cruxframework.crux.core.rebind.offline.AppCacheLinker.java

License:Apache License

private static String getProperty(ArtifactSet artifacts, String property) {
    for (CompilationResult result : artifacts.find(CompilationResult.class)) {
        if (result.getPropertyMap() != null && !result.getPropertyMap().isEmpty()) {
            for (SortedMap<SelectionProperty, String> propertyMap : result.getPropertyMap()) {
                for (SelectionProperty selectionProperty : propertyMap.keySet()) {
                    if (property.equals(selectionProperty.getName())) {
                        return propertyMap.get(selectionProperty);
                    }//from   www . j  a  va  2 s .  co m
                }
            }
        }

    }
    return null;
}