use of org.eclipse.xtext.xbase.typesystem.util.CommonTypeComputationServices 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.typesystem.util.CommonTypeComputationServices in project xtext-xtend by eclipse.
the class DeferredTypeParameterHintCollectorTest method createOwner.
@Override
protected StandardTypeReferenceOwner createOwner() {
CommonTypeComputationServices _services = this.getServices();
ResourceSet _contextResourceSet = this.getContextResourceSet();
return new StandardTypeReferenceOwner(_services, _contextResourceSet) {
@Override
public void acceptHint(final Object handle, final LightweightBoundTypeArgument boundTypeArgument) {
DeferredTypeParameterHintCollectorTest.this.hints.put(handle, boundTypeArgument);
}
@Override
public List<LightweightBoundTypeArgument> getAllHints(final Object handle) {
return DeferredTypeParameterHintCollectorTest.this.hints.get(handle);
}
@Override
public boolean isResolved(final Object handle) {
return false;
}
};
}
use of org.eclipse.xtext.xbase.typesystem.util.CommonTypeComputationServices 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.typesystem.util.CommonTypeComputationServices 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