Search in sources :

Example 1 with ClasspathTypeProviderFactory

use of org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory in project xtext-xtend by eclipse.

the class NoJRESmokeTester method processFile.

@Override
public void processFile(String data) throws Exception {
    XtextResourceSet resourceSet = new XtextResourceSet();
    NoOpClassLoader classLoader = new NoOpClassLoader();
    resourceSet.setClasspathURIContext(classLoader);
    ClasspathTypeProviderFactory factory = new ClasspathTypeProviderFactory(classLoader, typeResourceServices);
    factory.createTypeProvider(resourceSet);
    EObject parsed = parseHelperNoJRE.parse(data, resourceSet);
    EcoreUtil.resolveAll(parsed);
    checkNoErrorsInValidator(data, (XtextResource) parsed.eResource());
}
Also used : XtextResourceSet(org.eclipse.xtext.resource.XtextResourceSet) EObject(org.eclipse.emf.ecore.EObject) ClasspathTypeProviderFactory(org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)1 ClasspathTypeProviderFactory (org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory)1 XtextResourceSet (org.eclipse.xtext.resource.XtextResourceSet)1