Search in sources :

Example 1 with JdtBasedSimpleTypeScopeProvider

use of org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider in project xtext-eclipse by eclipse.

the class JdtBasedSimpleTypeScopeProviderTest method setUp.

@Before
public void setUp() throws Exception {
    projectProvider = new MockJavaProjectProvider();
    factory = new JdtTypeProviderFactory(projectProvider);
    IQualifiedNameConverter qualifiedNameConverter = new IQualifiedNameConverter.DefaultImpl();
    scopeProvider = new JdtBasedSimpleTypeScopeProvider(factory, qualifiedNameConverter);
    resourceSet = new ResourceSetImpl();
    resource = new ResourceImpl();
    resource.setURI(URI.createURI("http://does/not/exist.file"));
    emptyResource = new ResourceImpl();
    emptyResource.setURI(URI.createURI("http://does/not/exist.file2"));
    resourceSet.getResources().add(emptyResource);
    resourceSet.getResources().add(resource);
    field = TypesFactory.eINSTANCE.createJvmField();
    resource.getContents().add(field);
}
Also used : JdtTypeProviderFactory(org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory) ResourceSetImpl(org.eclipse.emf.ecore.resource.impl.ResourceSetImpl) ResourceImpl(org.eclipse.emf.ecore.resource.impl.ResourceImpl) JdtBasedSimpleTypeScopeProvider(org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider) IQualifiedNameConverter(org.eclipse.xtext.naming.IQualifiedNameConverter) MockJavaProjectProvider(org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider) Before(org.junit.Before)

Aggregations

ResourceImpl (org.eclipse.emf.ecore.resource.impl.ResourceImpl)1 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)1 JdtTypeProviderFactory (org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory)1 MockJavaProjectProvider (org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider)1 JdtBasedSimpleTypeScopeProvider (org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider)1 IQualifiedNameConverter (org.eclipse.xtext.naming.IQualifiedNameConverter)1 Before (org.junit.Before)1