List of usage examples for com.google.gwt.dev.util DefaultTextOutput indentIn
public void indentIn()
From source file:uk.co.thinkofdeath.mapviewer.linker.WorkerLinker.java
License:Apache License
@Override public ArtifactSet link(TreeLogger logger, LinkerContext context, ArtifactSet artifacts) throws UnableToCompleteException { ArtifactSet set = new ArtifactSet(artifacts); DefaultTextOutput output = new DefaultTextOutput(true); Set<CompilationResult> results = artifacts.find(CompilationResult.class); CompilationResult result = results.iterator().next(); output.print("(function() {"); output.indentOut();/*from w w w. ja va2s. co m*/ output.newline(); output.print("var $wnd = self, window = self, $doc = {compatMode:false}," + "$stats = function(){}, $sessionId = function(){};"); output.newline(); output.print(result.getJavaScript()[0]); output.newline(); output.print("gwtOnLoad(null, '" + context.getModuleName() + "', null);"); output.indentIn(); output.newline(); output.print("})();"); set.add(emitString(logger, output.toString(), context.getModuleName() + ".js")); return set; }