com.google.gwt.core.ext.linker.Artifact Java Examples

The following examples show how to use com.google.gwt.core.ext.linker.Artifact. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientEngineLinker.java    From flow with Apache License 2.0 6 votes vote down vote up
@Override
protected Collection<Artifact<?>> doEmitCompilation(TreeLogger logger,
        LinkerContext context, CompilationResult result,
        ArtifactSet artifacts) throws UnableToCompleteException {

    String[] js = result.getJavaScript();
    if (js.length != 1) {
        logger.branch(TreeLogger.ERROR,
                "The module must not have multiple fragments when using the "
                        + getDescription() + " Linker.",
                null);
        throw new UnableToCompleteException();
    }

    ArrayList<Artifact<?>> toReturn = new ArrayList<>();
    toReturn.add(new Script(result.getStrongName(), js[0]));
    toReturn.addAll(
            emitSelectionInformation(result.getStrongName(), result));
    return toReturn;
}
 
Example #2
Source File: ClientEngineLinker.java    From flow with Apache License 2.0 5 votes vote down vote up
private Artifact<?> emitStrongNamePropertyFile(TreeLogger logger,
        LinkerContext context, ArtifactSet artifacts)
                throws UnableToCompleteException {
    Script result = getScript(logger, artifacts);

    String contents = "jsFile=" + getJsFilename(context, result);
    return emitString(logger, contents, "compile.properties");
}
 
Example #3
Source File: GeneratorContextStub.java    From mvp4g with Apache License 2.0 4 votes vote down vote up
public void commitArtifact(TreeLogger logger,
                           Artifact<?> artifact)
  throws UnableToCompleteException {
  // nothing to do
}