String[] allowedValues = bindingProperty.getAllowedValues(bindingProperty.getRootCondition());
bindingProperty.setRootGeneratedValues(allowedValues);
}
// A snapshot of the module's configuration before we modified it.
ConfigProps config = new ConfigProps(moduleDef);
// We need a cross-site linker. Automatically replace the default linker.
if (IFrameLinker.class.isAssignableFrom(moduleDef.getActivePrimaryLinker())) {
moduleDef.addLinker("xsiframe");
}
// Check that we have a compatible linker.
Class<? extends Linker> linker = moduleDef.getActivePrimaryLinker();
if (!CrossSiteIframeLinker.class.isAssignableFrom(linker)) {
logger.log(TreeLogger.ERROR,
"linkers other than CrossSiteIFrameLinker aren't supported. Found: " + linker.getName());
throw new UnableToCompleteException();
}
// Deactivate precompress linker.
if (moduleDef.deactivateLinker("precompress")) {
logger.log(TreeLogger.WARN, "Deactivated PrecompressLinker");
}
// Print a nice error if the superdevmode hook isn't present
if (config.getStrings("devModeRedirectEnabled").isEmpty()) {
throw new RuntimeException("devModeRedirectEnabled isn't set for module: " +
moduleDef.getName());
}
// Disable the redirect hook here to make sure we don't have an infinite loop.
// (There is another check in the JavaScript, but just in case.)
overrideConfig(moduleDef, "devModeRedirectEnabled", "false");
// Turn off "installCode" if it's on because it makes debugging harder.
// (If it's already off, don't change anything.)
if (config.getBoolean("installCode", true)) {
overrideConfig(moduleDef, "installCode", "false");
// Make sure installScriptJs is set to the default for compiling without installCode.
overrideConfig(moduleDef, "installScriptJs",
"com/google/gwt/core/ext/linker/impl/installScriptDirect.js");
}