|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.ext.Linker
com.google.gwt.core.ext.linker.AbstractLinker
com.google.gwt.core.ext.linker.impl.SelectionScriptLinker
com.google.gwt.core.linker.CrossSiteIframeLinker
org.cruxframework.crux.plugin.gadget.linker.GadgetLinker
@LinkerOrder(value=PRIMARY) @Shardable public final class GadgetLinker
A Gadget does not use the .nocache.js file for the bootstrap. All bootstrap code is inserted
inside the gadget manifest file (the .gadget.xml file).
The linker also needs to change some script templates to integrate the application with the gadget container.
All requests for resources must be piped through the gadget proxy (using gadgets.io.getProxyUrl()
method).
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker |
|---|
COMPUTE_SCRIPT_BASE_JS, FRAGMENT_EXTENSION, FRAGMENT_SUBDIR, permutationsUtil, PROCESS_METAS_JS, USE_SOURCE_MAPS_PROPERTY |
| Constructor Summary | |
|---|---|
GadgetLinker()
|
|
| Method Summary | |
|---|---|
protected com.google.gwt.core.ext.linker.EmittedArtifact |
emitSelectionScript(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts)
This method changes the gwt default behavior to emit the selection script into the manifest file. |
protected String |
fillSelectionScriptTemplate(StringBuffer selectionScript,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts,
com.google.gwt.core.ext.linker.CompilationResult result)
Locale handling is different for gadgets, so we need to insert a specific script for it. |
String |
getDescription()
|
protected String |
getJsComputeScriptBase(com.google.gwt.core.ext.LinkerContext context)
|
protected String |
getJsComputeUrlForResource(com.google.gwt.core.ext.LinkerContext context)
|
protected String |
getJsInstallScript(com.google.gwt.core.ext.LinkerContext context)
|
protected String |
getJsProcessMetas(com.google.gwt.core.ext.LinkerContext context)
|
protected String |
getJsSetGadgetLocale(com.google.gwt.core.ext.LinkerContext context)
Gets the setLocale template for gadgets |
protected String |
getJsWaitForBodyLoaded(com.google.gwt.core.ext.LinkerContext context)
|
protected String |
getSelectionScriptTemplate(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context)
|
com.google.gwt.core.ext.linker.ArtifactSet |
link(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts,
boolean onePermutation)
We need to save the original artifactSet received here to be able to re-emit the selection script when relink(TreeLogger, LinkerContext, ArtifactSet) method is called. |
com.google.gwt.core.ext.linker.ArtifactSet |
relink(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet newArtifacts)
We must re-emit the selection script here, once the script is placed on the gadget manifest file. |
| Methods inherited from class com.google.gwt.core.linker.CrossSiteIframeLinker |
|---|
getBooleanConfigurationProperty, getCompilationExtension, getDeferredFragmentSuffix, getHostedFilename, getHostedFilenameFull, getJsDevModeRedirectHook, getJsInstallLocation, getJsIsBodyLoaded, getJsLoadExternalStylesheets, getJsModuleFunctionErrorCatch, getJsPermutations, getJsProperties, getJsRunAsync, getModulePrefix, getModuleSuffix, getScriptChunkSeparator, getStringConfigurationProperty, includeJs, maybeAddHostedModeFile, maybeOutputPropertyMap, shouldIncludeBootstrapInPrimaryFragment, shouldInstallCode, shouldUseSelfForWindowAndDocument, wrapDeferredFragment, wrapPrimaryFragment |
| Methods inherited from class com.google.gwt.core.ext.linker.impl.SelectionScriptLinker |
|---|
charsPerChunk, doEmitCompilation, emitSelectionInformation, generateDeferredFragment, generatePrimaryFragment, generatePrimaryFragmentString, generateSelectionScript, generateSelectionScript, getDeferredFragmentPrefix, getFragmentSubdir, getModulePrefix, link, readFileToStringBuffer, replaceAll, splitPrimaryJavaScript, supportsDevModeInJunit |
| Methods inherited from class com.google.gwt.core.ext.linker.AbstractLinker |
|---|
emitBytes, emitBytes, emitInputStream, emitInputStream, emitString, emitString, emitWithStrongName, emitWithStrongName |
| Methods inherited from class com.google.gwt.core.ext.Linker |
|---|
isShardable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GadgetLinker()
| Method Detail |
|---|
public String getDescription()
getDescription in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getDescription()
public com.google.gwt.core.ext.linker.ArtifactSet link(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts,
boolean onePermutation)
throws com.google.gwt.core.ext.UnableToCompleteException
relink(TreeLogger, LinkerContext, ArtifactSet) method is called.
link in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinkercom.google.gwt.core.ext.UnableToCompleteExceptionSelectionScriptLinker.link(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext, com.google.gwt.core.ext.linker.ArtifactSet, boolean)
public com.google.gwt.core.ext.linker.ArtifactSet relink(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet newArtifacts)
throws com.google.gwt.core.ext.UnableToCompleteException
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 .crux.xml files.
relink in class com.google.gwt.core.ext.Linkercom.google.gwt.core.ext.UnableToCompleteExceptionLinker.relink(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext, com.google.gwt.core.ext.linker.ArtifactSet)
protected com.google.gwt.core.ext.linker.EmittedArtifact emitSelectionScript(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts)
throws com.google.gwt.core.ext.UnableToCompleteException
emitSelectionScript in class com.google.gwt.core.ext.linker.impl.SelectionScriptLinkercom.google.gwt.core.ext.UnableToCompleteExceptionSelectionScriptLinker.emitSelectionScript(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext, com.google.gwt.core.ext.linker.ArtifactSet)
protected String fillSelectionScriptTemplate(StringBuffer selectionScript,
com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context,
com.google.gwt.core.ext.linker.ArtifactSet artifacts,
com.google.gwt.core.ext.linker.CompilationResult result)
throws com.google.gwt.core.ext.UnableToCompleteException
fillSelectionScriptTemplate in class com.google.gwt.core.linker.CrossSiteIframeLinkercom.google.gwt.core.ext.UnableToCompleteExceptionCrossSiteIframeLinker.fillSelectionScriptTemplate(java.lang.StringBuffer, com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext, com.google.gwt.core.ext.linker.ArtifactSet, com.google.gwt.core.ext.linker.CompilationResult)protected String getJsComputeUrlForResource(com.google.gwt.core.ext.LinkerContext context)
getJsComputeUrlForResource in class com.google.gwt.core.linker.CrossSiteIframeLinkerprotected String getJsSetGadgetLocale(com.google.gwt.core.ext.LinkerContext context)
protected String getJsComputeScriptBase(com.google.gwt.core.ext.LinkerContext context)
getJsComputeScriptBase in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getJsComputeScriptBase(com.google.gwt.core.ext.LinkerContext)protected String getJsInstallScript(com.google.gwt.core.ext.LinkerContext context)
getJsInstallScript in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getJsInstallScript(com.google.gwt.core.ext.LinkerContext)protected String getJsProcessMetas(com.google.gwt.core.ext.LinkerContext context)
getJsProcessMetas in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getJsProcessMetas(com.google.gwt.core.ext.LinkerContext)protected String getJsWaitForBodyLoaded(com.google.gwt.core.ext.LinkerContext context)
getJsWaitForBodyLoaded in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getJsWaitForBodyLoaded(com.google.gwt.core.ext.LinkerContext)
protected String getSelectionScriptTemplate(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.core.ext.LinkerContext context)
getSelectionScriptTemplate in class com.google.gwt.core.linker.CrossSiteIframeLinkerCrossSiteIframeLinker.getSelectionScriptTemplate(com.google.gwt.core.ext.TreeLogger, com.google.gwt.core.ext.LinkerContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||