use of org.spoofax.terms.typesmart.TypesmartTermFactory in project spoofax by metaborg.
the class TermFactoryService method get.
@Override
public ITermFactory get(ILanguageComponent component, @Nullable IProject project, boolean supportsTypesmart) {
if (!supportsTypesmart || project == null) {
return genericFactory;
}
ISpoofaxProjectConfig config = configService.get(project);
if (config == null || !config.typesmart()) {
return genericFactory;
}
TypesmartContext context = getTypesmartContext(component);
if (!context.isEmpty()) {
return new TypesmartTermFactory(genericFactory, typesmartLogger, context);
} else {
return genericFactory;
}
}
use of org.spoofax.terms.typesmart.TypesmartTermFactory in project spoofax by metaborg.
the class TermFactoryService method get.
@Override
public ITermFactory get(ILanguageImpl impl, @Nullable IProject project, boolean supportsTypesmart) {
if (!supportsTypesmart || project == null) {
return genericFactory;
}
ISpoofaxProjectConfig config = configService.get(project);
if (config == null || !config.typesmart()) {
return genericFactory;
}
TypesmartContext context = getTypesmartContext(impl);
if (!context.isEmpty()) {
return new TypesmartTermFactory(genericFactory, typesmartLogger, context);
} else {
return genericFactory;
}
}
Aggregations