use of org.eclipse.internal.xtend.xtend.ast.ExtensionFile in project dsl-devkit by dsldevkit.
the class CompilationContextTest method isExtension.
@Test
public void isExtension() {
ExecutionContextImpl executionContext = new ExecutionContextImpl();
executionContext.registerMetaModel(new JavaBeansMetaModel());
ExtensionFile extensionFile = ParseFacade.file(new InputStreamReader(getClass().getResourceAsStream("/com/avaloq/tools/ddk/xtext/generator/expression/TestExtensions.ext")), "TestExtensions.ext");
executionContext = (ExecutionContextImpl) executionContext.cloneWithResource(extensionFile);
final CompilationContext context = new CompilationContext(executionContext, null);
assertTrue("test extension not identified", context.isExtension("test"));
}
Aggregations