}
ArtifactContext ac = new ArtifactContext(Module.LANGUAGE_MODULE_NAME,
module.getLanguageModule().getVersion(), ArtifactContext.JS_MODEL);
ac.setIgnoreDependencies(true);
ac.setThrowErrorIfMissing(true);
ArtifactResult lmar = getContext().getRepositoryManager().getArtifactResult(ac);
resolveModule(lmar, module.getLanguageModule(), null, dependencyTree,
phasedUnitsOfDependencies, forCompiledModule);
}
//Then we continue loading whatever they asked for first.
}
//Create a similar artifact but with -model.js extension
File js = artifact.artifact();
if (js.getName().endsWith(ArtifactContext.JS) && !js.getName().endsWith(ArtifactContext.JS_MODEL)) {
ArtifactContext ac = new ArtifactContext(artifact.name(),
artifact.version(), ArtifactContext.JS_MODEL);
ac.setIgnoreDependencies(true);
ac.setThrowErrorIfMissing(true);
ArtifactResult lmar = getContext().getRepositoryManager().getArtifactResult(ac);
js = lmar.artifact();
}
if (module instanceof JsonModule) {
if (((JsonModule)module).getModel() != null) {
return;
}