Example usage for com.google.gwt.core.ext LinkerContext getConfigurationProperties

List of usage examples for com.google.gwt.core.ext LinkerContext getConfigurationProperties

Introduction

In this page you can find the example usage for com.google.gwt.core.ext LinkerContext getConfigurationProperties.

Prototype

SortedSet<ConfigurationProperty> getConfigurationProperties();

Source Link

Document

Returns all configuration properties defined in the module.

Usage

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

License:Apache License

private boolean isTest(LinkerContext context) {
    boolean isTest = false;

    for (ConfigurationProperty property : context.getConfigurationProperties()) {
        String name = property.getName();
        List<String> values = property.getValues();

        if ("junit.moduleName".equals(name) && !values.isEmpty() && !values.get(0).isEmpty()) {
            isTest = true;//from   ww  w .j  a  va2 s  .c om
            break;
        }
    }

    return isTest;
}

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

License:Apache License

private boolean canVerifyNewerVersion(LinkerContext context) {
    boolean verifyNewerVersion = true;

    for (ConfigurationProperty property : context.getConfigurationProperties()) {
        if (PROPERTY_VERIFY_NEWER_VERSION.equals(property.getName())) {
            List<String> values = property.getValues();
            verifyNewerVersion = !(!values.isEmpty() && "false".equals(values.get(0)));

            break;
        }//from   www .ja  v a 2  s .c  o  m
    }

    return verifyNewerVersion;
}

From source file:org.cesiumjs.linker.CesiumScriptInjector.java

License:Apache License

private static String getPageRelativeModulePath(LinkerContext context) {
    String moduleName = context.getModuleName();

    List<String> pathBindings = null;
    for (ConfigurationProperty property : context.getConfigurationProperties()) {
        if (PAGE_RELATIVE_MODULE_PATH.equals(property.getName())) {
            pathBindings = property.getValues();
        }/*ww w.j  a v  a  2  s. c  om*/
    }
    if (pathBindings == null)
        return moduleName;

    for (String binding : pathBindings) {
        String[] parts = binding.split("=");
        if (parts.length == 2 && moduleName.equals(parts[0])) {
            System.out.println("      Setting page-relative module path for module '" + moduleName
                    + "' using gwt.xml config");
            return parts[1];
        }
    }

    return moduleName;
}

From source file:org.gwtbootstrap3.extras.cachemanifest.Offline.java

License:Apache License

@Override
public ArtifactSet link(final TreeLogger logger, final LinkerContext context, final ArtifactSet artifacts)
        throws UnableToCompleteException {

    final ArtifactSet artifactset = new ArtifactSet(artifacts);

    final HashSet<String> resources = new HashSet<String>();
    for (final EmittedArtifact emitted : artifacts.find(EmittedArtifact.class)) {

        if (skipArtifact(emitted))
            continue;
        resources.add(emitted.getPartialPath());
    }/*from w  w w . j av a 2  s .c o  m*/

    final SortedSet<ConfigurationProperty> staticFileProperties = context.getConfigurationProperties();
    for (final ConfigurationProperty configurationProperty : staticFileProperties) {
        final String name = configurationProperty.getName();
        if (CACHEMANIFEST_STATIC_FILES_PROPERTY.equals(name)) {
            for (final String value : configurationProperty.getValues()) {
                resources.add(value);
            }
        }
    }

    final String manifestString = buildManifestContents(resources);
    if (manifestString != null) {
        final EmittedArtifact manifest = emitString(logger, manifestString, "appcache.manifest");
        artifactset.add(manifest);
    }
    return artifactset;
}