Java Code Examples for org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory#createTypeProvider()

The following examples show how to use org.eclipse.xtext.common.types.access.ClasspathTypeProviderFactory#createTypeProvider() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NoJRESmokeTester.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@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());
}
 
Example 2
Source File: ClasspathBasedConstructorScopeTest.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
	factory = new ClasspathTypeProviderFactory(getClass().getClassLoader(), null);
	resourceSet = new ResourceSetImpl();
	typeScope = new ClasspathBasedTypeScope(factory.createTypeProvider(resourceSet), new IQualifiedNameConverter.DefaultImpl(), Predicates.<IEObjectDescription>alwaysTrue());
	constructorScope = new ClasspathBasedConstructorScope(typeScope);
}
 
Example 3
Source File: NoJRESmokeTester.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@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());
}
 
Example 4
Source File: NoJRESmokeTester.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@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());
}
 
Example 5
Source File: NoJRESmokeTester.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@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());
}
 
Example 6
Source File: ClasspathBasedTypeScopeTest.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
@Before
public void setUp() throws Exception {
	factory = new ClasspathTypeProviderFactory(getClass().getClassLoader(), null);
	resourceSet = new ResourceSetImpl();
	typeScope = new ClasspathBasedTypeScope(factory.createTypeProvider(resourceSet), new IQualifiedNameConverter.DefaultImpl(),Predicates.<IEObjectDescription>alwaysTrue());
}