Skip to content

Commit

Permalink
resolving for the metamodel needs to take account of overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
tombentley committed Nov 13, 2015
1 parent ae3dd66 commit bebfff9
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.redhat.ceylon.model.loader.impl.reflect.model.ReflectionModuleManager;
import com.redhat.ceylon.model.loader.model.LazyModule;
import com.redhat.ceylon.model.loader.model.LazyPackage;
import com.redhat.ceylon.model.typechecker.model.ModelUtil;
import com.redhat.ceylon.model.typechecker.model.Module;
import com.redhat.ceylon.model.typechecker.model.ModuleImport;
import com.redhat.ceylon.model.typechecker.model.Modules;
Expand Down Expand Up @@ -109,6 +110,14 @@ public boolean loadModule(String name, String version,
}
}

@Override
public Module getOrCreateModule(List<String> moduleName, String version) {
ModuleLoader contextModuleLoader = org.jboss.modules.Module.getContextModuleLoader();
if (contextModuleLoader instanceof RuntimeResolver) {
version = ((RuntimeResolver)contextModuleLoader).resolveVersion(ModelUtil.formatPath(moduleName), version);
}
return super.getOrCreateModule(moduleName, version);
}
@Override
public RuntimeModelLoader getModelLoader() {
return (RuntimeModelLoader) super.getModelLoader();
Expand Down

0 comments on commit bebfff9

Please sign in to comment.