本文整理汇总了Java中com.google.gwt.core.ext.linker.ArtifactSet.remove方法的典型用法代码示例。如果您正苦于以下问题:Java ArtifactSet.remove方法的具体用法?Java ArtifactSet.remove怎么用?Java ArtifactSet.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.ext.linker.ArtifactSet
的用法示例。
在下文中一共展示了ArtifactSet.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: link
import com.google.gwt.core.ext.linker.ArtifactSet; //导入方法依赖的package包/类
@Override
public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException {
ArtifactSet toReturn = new ArtifactSet(artifacts);
Set<EmittedArtifact> emittedArtifacts = artifacts.find(EmittedArtifact.class);
for (EmittedArtifact emittedArtifact : emittedArtifacts) {
String partialPath = emittedArtifact.getPartialPath();
// Add to Cesium.js file, path, where Cesium/Cesium.js stored.
// It need for inject css files for example - Viewer
if (partialPath.endsWith("/Cesium.js")) {
String contents = CesiumLinkerUtils.getContents(emittedArtifact, logger);
StringBuffer sb = new StringBuffer(contents);
sb.insert(0, "window.CesiumPath = '" + context.getModuleName() + "/js/';\n");
toReturn.remove(emittedArtifact);
toReturn.add(emitString(logger, sb.toString(), partialPath));
}
}
return toReturn;
}
示例2: link
import com.google.gwt.core.ext.linker.ArtifactSet; //导入方法依赖的package包/类
@Override
public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException {
ArtifactSet toReturn = new ArtifactSet(artifacts);
Set<EmittedArtifact> emittedArtifacts = artifacts.find(EmittedArtifact.class);
for (EmittedArtifact emittedArtifact : emittedArtifacts) {
String partialPath = emittedArtifact.getPartialPath();
// Add to Cesium.js file, path, where Cesium/Cesium.js stored.
// It need for inject css files for example - Viewer
if (partialPath.endsWith("/olcesium.js")) {
String contents = OLCesiumLinkerUtils.getContents(emittedArtifact, logger);
StringBuffer sb = new StringBuffer(contents);
sb.insert(0, "window.OpenLayersPath = '" + context.getModuleName() + "/js/';\n");
toReturn.remove(emittedArtifact);
toReturn.add(emitString(logger, sb.toString(), partialPath));
}
}
return toReturn;
}
示例3: link
import com.google.gwt.core.ext.linker.ArtifactSet; //导入方法依赖的package包/类
@Override
public ArtifactSet link(TreeLogger logger, LinkerContext context,
ArtifactSet artifacts) throws UnableToCompleteException {
ArtifactSet toLink = new ArtifactSet(artifacts);
// Mask the stub manifest created by the generator
for (EmittedArtifact res : toLink.find(EmittedArtifact.class)) {
if (res.getPartialPath().endsWith(".gadget.xml")) {
manifestArtifact = res;
toLink.remove(res);
break;
}
}
if (manifestArtifact == null) {
if (artifacts.find(CompilationResult.class).isEmpty()) {
// Maybe hosted mode or junit, defer to XSLinker.
return new XSLinker().link(logger, context, toLink);
} else {
// When compiling for web mode, enforce that the manifest is present.
logger.log(TreeLogger.ERROR,
"No gadget manifest found in ArtifactSet.");
throw new UnableToCompleteException();
}
}
return super.link(logger, context, toLink);
}