use of org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory 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);
}
use of org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory in project xtext-eclipse by eclipse.
the class JdtBasedConstructorScopeTest method setUp.
@Before
public void setUp() throws Exception {
projectProvider = new MockJavaProjectProvider();
factory = new JdtTypeProviderFactory(projectProvider);
resourceSet = new ResourceSetImpl();
typeScope = new JdtBasedSimpleTypeScope(factory.createTypeProvider(resourceSet), new IQualifiedNameConverter.DefaultImpl(), Predicates.<IEObjectDescription>alwaysTrue());
constructorScope = new JdtBasedConstructorScope(typeScope);
}
use of org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory in project xtext-eclipse by eclipse.
the class JdtBasedSimpleTypeScopeTest method setUp.
@Before
public void setUp() throws Exception {
projectProvider = new MockJavaProjectProvider();
factory = new JdtTypeProviderFactory(projectProvider);
resourceSet = new ResourceSetImpl();
typeScope = new JdtBasedSimpleTypeScope(factory.createTypeProvider(resourceSet), new IQualifiedNameConverter.DefaultImpl(), Predicates.<IEObjectDescription>alwaysTrue());
}
use of org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory in project xtext-eclipse by eclipse.
the class AbstractContentAssistTest method initializeTypeProvider.
protected void initializeTypeProvider(XtextResourceSet resourceSet) {
JdtTypeProviderFactory typeProviderFactory = new JdtTypeProviderFactory(this);
typeProviderFactory.findOrCreateTypeProvider(resourceSet);
resourceSet.setClasspathURIContext(getJavaProject(resourceSet));
}
use of org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory in project xtext-eclipse by eclipse.
the class AbstractContentAssistTest method initializeTypeProvider.
protected void initializeTypeProvider(final XtextResourceSet set) {
final JdtTypeProviderFactory typeProviderFactory = new JdtTypeProviderFactory(this);
typeProviderFactory.findOrCreateTypeProvider(set);
set.setClasspathURIContext(getJavaProject(set));
}
Aggregations