List of usage examples for com.google.gwt.core.ext.linker.impl ResourceInjectionUtil injectResources
public static StringBuffer injectResources(StringBuffer selectionScript, ArtifactSet artifacts)
From source file:com.bedatadriven.rebar.appcache.linker.AppCacheIFrameLinker.java
License:Apache License
private StringBuffer fillSelectionScriptTemplate(TreeLogger logger, PermutationContext context, ArtifactSet artifacts, StringBuffer selectionScript) throws UnableToCompleteException { String computeScriptBase;//from w w w . j a va 2 s. c om String processMetas; try { computeScriptBase = Utility.getFileFromClassPath(COMPUTE_SCRIPT_BASE_JS); processMetas = Utility.getFileFromClassPath(PROCESS_METAS_JS); } catch (IOException e) { logger.log(TreeLogger.ERROR, "Unable to read selection script template", e); throw new UnableToCompleteException(); } replaceAll(selectionScript, "__COMPUTE_SCRIPT_BASE__", computeScriptBase); replaceAll(selectionScript, "__PROCESS_METAS__", processMetas); addPermutationJs(context, selectionScript); selectionScript = ResourceInjectionUtil.injectResources(selectionScript, artifacts); replaceAll(selectionScript, "__MODULE_FUNC__", context.getModuleFunctionName()); replaceAll(selectionScript, "__MODULE_NAME__", context.getModuleName()); replaceAll(selectionScript, "__HOSTED_FILENAME__", getHostedFilename()); return selectionScript; }