Example usage for com.google.gwt.core.ext.linker ArtifactSet iterator

List of usage examples for com.google.gwt.core.ext.linker ArtifactSet iterator

Introduction

In this page you can find the example usage for com.google.gwt.core.ext.linker ArtifactSet iterator.

Prototype

public Iterator<Artifact<?>> iterator() 

Source Link

Usage

From source file:org.cruxframework.crux.plugin.gadget.linker.GadgetLinker.java

License:Apache License

/**
 * We must re-emit the selection script here, once the script is placed on the gadget manifest file.
 * <p>/*www.  j a va  2 s.c  o  m*/
 * It is necessary because the HTML code for the page is also placed on this same file. If we do not
 * re-generate the manifest file, hot deployment would not work for {@code .crux.xml} files.
 * @see com.google.gwt.core.ext.Linker#relink(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext, com.google.gwt.core.ext.linker.ArtifactSet)
 */
@Override
public ArtifactSet relink(TreeLogger logger, LinkerContext context, ArtifactSet newArtifacts)
        throws UnableToCompleteException {
    permutationsUtil.setupPermutationsMap(toLink);
    ArtifactSet toReturn = new ArtifactSet(toLink);

    Iterator<Artifact<?>> iterator = newArtifacts.iterator();
    while (iterator.hasNext()) {
        toReturn.add(iterator.next());
    }

    EmittedArtifact art = emitSelectionScript(logger, context, toLink);
    if (art != null) {
        toReturn.add(art);
    }
    maybeOutputPropertyMap(logger, context, toReturn);
    maybeAddHostedModeFile(logger, context, toReturn, null);
    return toReturn;
}