use of org.metaborg.core.build.dependency.MissingDependencyException in project spoofax by metaborg.
the class TermFactoryService method getTypesmartContext.
private TypesmartContext getTypesmartContext(ILanguageComponent component) {
TypesmartContext context = mergedTypesmartContexts.get(component);
if (context == null) {
FileObject localContextFile = new SpoofaxCommonPaths(component.location()).strTypesmartExportedFile();
context = TypesmartContext.load(localContextFile, typesmartLogger);
try {
for (ILanguageComponent other : dependencyService.sourceDeps(component)) {
FileObject otherContextFile = new SpoofaxCommonPaths(other.location()).strTypesmartExportedFile();
TypesmartContext otherContext = TypesmartContext.load(otherContextFile, typesmartLogger);
context = context.merge(otherContext);
}
} catch (MissingDependencyException e) {
typesmartLogger.error("Could not load source dependencies of " + component + " to resolve typesmart contexts.", e);
}
mergedTypesmartContexts.put(component, context);
}
return context;
}
Aggregations