Search in sources :

Example 1 with JdtBasedSimpleTypeScope

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

the class JdtBasedSimpleTypeScopeProviderTest method testGetScope_01.

@Test
public void testGetScope_01() {
    JdtBasedSimpleTypeScope scope = (JdtBasedSimpleTypeScope) scopeProvider.getScope(field.eResource(), TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE);
    assertNotNull(scope);
    assertSame(factory.findTypeProvider(resourceSet), scope.getTypeProvider());
}
Also used : JdtBasedSimpleTypeScope(org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope) Test(org.junit.Test)

Example 2 with JdtBasedSimpleTypeScope

use of org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope 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);
}
Also used : JdtTypeProviderFactory(org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory) ResourceSetImpl(org.eclipse.emf.ecore.resource.impl.ResourceSetImpl) JdtBasedSimpleTypeScope(org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope) JdtBasedConstructorScope(org.eclipse.xtext.common.types.xtext.ui.JdtBasedConstructorScope) MockJavaProjectProvider(org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider) IEObjectDescription(org.eclipse.xtext.resource.IEObjectDescription) Before(org.junit.Before)

Example 3 with JdtBasedSimpleTypeScope

use of org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope 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());
}
Also used : JdtTypeProviderFactory(org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory) ResourceSetImpl(org.eclipse.emf.ecore.resource.impl.ResourceSetImpl) JdtBasedSimpleTypeScope(org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope) MockJavaProjectProvider(org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider) IEObjectDescription(org.eclipse.xtext.resource.IEObjectDescription) Before(org.junit.Before)

Aggregations

JdtBasedSimpleTypeScope (org.eclipse.xtext.common.types.xtext.ui.JdtBasedSimpleTypeScope)3 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)2 JdtTypeProviderFactory (org.eclipse.xtext.common.types.access.jdt.JdtTypeProviderFactory)2 MockJavaProjectProvider (org.eclipse.xtext.common.types.access.jdt.MockJavaProjectProvider)2 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)2 Before (org.junit.Before)2 JdtBasedConstructorScope (org.eclipse.xtext.common.types.xtext.ui.JdtBasedConstructorScope)1 Test (org.junit.Test)1