Search in sources :

Example 6 with MockJavaProjectProvider

use of org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider in project xtext-eclipse by eclipse.

the class JavaElementFinderTest method setUp.

@Before
public void setUp() throws Exception {
    resourceSet = new ResourceSetImpl();
    projectProvider = new MockJavaProjectProvider();
    projectProvider.setUseSource(true);
    typeProvider = new JdtTypeProvider(projectProvider.getJavaProject(resourceSet), resourceSet);
    elementFinder = new JavaElementFinder();
    elementFinder.setProjectProvider(projectProvider);
}
Also used : ResourceSetImpl(org.eclipse.emf.ecore.resource.impl.ResourceSetImpl) JdtTypeProvider(org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider) MockJavaProjectProvider(org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider) Before(org.junit.Before)

Aggregations

MockJavaProjectProvider (org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider)6 Before (org.junit.Before)6 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)4 JdtTypeProviderFactory (org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory)3 JdtBasedSimpleTypeScope (org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope)2 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)2 Callable (java.util.concurrent.Callable)1 ResourceImpl (org.eclipse.emf.ecore.resource.impl.ResourceImpl)1 JdtTypeProvider (org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider)1 JdtBasedConstructorScope (org.eclipse.xtext.common.types.xtext.ui.JdtBasedConstructorScope)1 JdtBasedSimpleTypeScopeProvider (org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScopeProvider)1 XtextResourceSetBasedProjectProvider (org.eclipse.xtext.common.types.xtext.ui.XtextResourceSetBasedProjectProvider)1 IQualifiedNameConverter (org.eclipse.xtext.naming.IQualifiedNameConverter)1 XtextResourceSet (org.eclipse.xtext.resource.XtextResourceSet)1 IStateChangeEventBroker (org.eclipse.xtext.ui.notification.IStateChangeEventBroker)1