use of org.eclipse.xtext.xbase.XbaseStandaloneSetup in project xtext-xtend by eclipse.
the class TypeBasedSimpleBenchmark method setUp.
@Override
protected void setUp() throws Exception {
Injector injector = new XbaseStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = new XtextResourceSet();
ClassLoader loader = getClass().getClassLoader();
resourceSet.setClasspathURIContext(loader);
typeProvider = new ClasspathTypeProvider(loader, resourceSet, indexedAccess, null);
CommonTypeComputationServices services = injector.getInstance(CommonTypeComputationServices.class);
owner = new StandardTypeReferenceOwner(services, resourceSet);
}
use of org.eclipse.xtext.xbase.XbaseStandaloneSetup in project xtext-xtend by eclipse.
the class ConvertToArrayBenchmark method setUp.
@Override
protected void setUp() throws Exception {
Injector injector = new XbaseStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = new XtextResourceSet();
ClassLoader loader = getClass().getClassLoader();
resourceSet.setClasspathURIContext(loader);
ClasspathTypeProvider typeProvider = new ClasspathTypeProvider(loader, resourceSet, indexedAccess, null);
CommonTypeComputationServices services = injector.getInstance(CommonTypeComputationServices.class);
StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, resourceSet);
typeReference = type.getReference(typeProvider, owner);
EcoreUtil.resolveAll(resourceSet);
}
use of org.eclipse.xtext.xbase.XbaseStandaloneSetup in project xtext-xtend by eclipse.
the class ParameterizedTypeReferenceBenchmark method setUp.
@Override
protected void setUp() throws Exception {
Injector injector = new XbaseStandaloneSetup().createInjectorAndDoEMFRegistration();
XtextResourceSet resourceSet = new XtextResourceSet();
ClassLoader loader = getClass().getClassLoader();
resourceSet.setClasspathURIContext(loader);
ClasspathTypeProvider typeProvider = new ClasspathTypeProvider(loader, resourceSet, indexedAccess, null);
CommonTypeComputationServices services = injector.getInstance(CommonTypeComputationServices.class);
StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, resourceSet);
typeReference = type.getReference(typeProvider, owner);
EcoreUtil.resolveAll(resourceSet);
}
Aggregations