本文整理汇总了Java中com.google.gwt.core.ext.LinkerContext.getConfigurationProperties方法的典型用法代码示例。如果您正苦于以下问题:Java LinkerContext.getConfigurationProperties方法的具体用法?Java LinkerContext.getConfigurationProperties怎么用?Java LinkerContext.getConfigurationProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.ext.LinkerContext
的用法示例。
在下文中一共展示了LinkerContext.getConfigurationProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPageRelativeModulePath
import com.google.gwt.core.ext.LinkerContext; //导入方法依赖的package包/类
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();
}
}
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;
}
示例2: getConfigurationValues
import com.google.gwt.core.ext.LinkerContext; //导入方法依赖的package包/类
@Nonnull
final Set<String> getConfigurationValues( @Nonnull final LinkerContext context, @Nonnull final String propertyName )
{
final HashSet<String> set = new HashSet<String>();
final SortedSet<ConfigurationProperty> properties = context.getConfigurationProperties();
for ( final ConfigurationProperty configurationProperty : properties )
{
if ( propertyName.equals( configurationProperty.getName() ) )
{
for ( final String value : configurationProperty.getValues() )
{
set.add( value );
}
}
}
return set;
}
示例3: loadTouchKitWidgetSetResources
import com.google.gwt.core.ext.LinkerContext; //导入方法依赖的package包/类
/**
* Traverses directories specified in gwt modules to be added to cache
* manifests. E.g. themes.
*
* @param context
*/
private void loadTouchKitWidgetSetResources(LinkerContext context) {
synchronized (cachedArtifacts) {
SortedSet<ConfigurationProperty> configurationProperties = context
.getConfigurationProperties();
for (ConfigurationProperty configurationProperty : configurationProperties) {
if (configurationProperty.getName().equals(
"touchkit.manifestlinker.additionalCacheRoot")) {
List<String> values = configurationProperty.getValues();
for (String root : values) {
addResourcesRecursively(root);
}
break;
}
}
}
}
示例4: link
import com.google.gwt.core.ext.LinkerContext; //导入方法依赖的package包/类
@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());
}
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;
}