当前位置: 首页>>代码示例>>Java>>正文


Java ArtifactSet.remove方法代码示例

本文整理汇总了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;
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:20,代码来源:CesiumLinker.java

示例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;
}
 
开发者ID:iSergio,项目名称:gwt-olcs,代码行数:20,代码来源:OLCesiumLinker.java

示例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);
}
 
开发者ID:kebernet,项目名称:shortyz,代码行数:30,代码来源:GadgetLinker.java


注:本文中的com.google.gwt.core.ext.linker.ArtifactSet.remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。