org.eclipse.xtext.common.types.xtext
Class AbstractTypeScopeProvider

java.lang.Object
  extended by org.eclipse.xtext.common.types.xtext.AbstractTypeScopeProvider
All Implemented Interfaces:
IGlobalScopeProvider
Direct Known Subclasses:
ClasspathBasedTypeScopeProvider, JdtBasedSimpleTypeScopeProvider

public abstract class AbstractTypeScopeProvider
extends java.lang.Object
implements IGlobalScopeProvider

Abstract super class of all local scope providers that allow references to Java types.

Author:
Sebastian Zarnekow - Initial contribution and API, Jan Koehnlein - introduced QualifiedName

Constructor Summary
AbstractTypeScopeProvider()
           
 
Method Summary
abstract  AbstractConstructorScope createConstructorScope(IJvmTypeProvider typeProvider, com.google.common.base.Predicate<IEObjectDescription> filter)
           
 IScope createMemberScope(JvmType containerType, com.google.common.base.Predicate<JvmMember> filter, com.google.common.base.Function<JvmMember,QualifiedName> names, IScope outer)
           
abstract  AbstractTypeScope createTypeScope(IJvmTypeProvider typeProvider, com.google.common.base.Predicate<IEObjectDescription> filter)
           
 IScope getScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference)
           
 IScope getScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<IEObjectDescription> filter)
          Returns a global scope for the given context.
 IJvmTypeProvider getTypeProvider(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
abstract  IJvmTypeProvider.Factory getTypeProviderFactory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTypeScopeProvider

public AbstractTypeScopeProvider()
Method Detail

getScope

public IScope getScope(org.eclipse.emf.ecore.resource.Resource resource,
                       org.eclipse.emf.ecore.EReference reference)

getScope

public IScope getScope(org.eclipse.emf.ecore.resource.Resource resource,
                       org.eclipse.emf.ecore.EReference reference,
                       com.google.common.base.Predicate<IEObjectDescription> filter)
Description copied from interface: IGlobalScopeProvider
Returns a global scope for the given context. The scope provides access to the EObjectDescription visible from the given Resource according to the definition of the global scope hierarchy (which is usually defined by IContainer.Manager).

Specified by:
getScope in interface IGlobalScopeProvider
Parameters:
resource - the resource from which the global scope is looked at.
Returns:
IScope representing the inner most IScope for the passed context and reference. Note for implementors: The result may not be null. Return IScope.NULLSCOPE instead.

getTypeProvider

public IJvmTypeProvider getTypeProvider(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)

createTypeScope

public abstract AbstractTypeScope createTypeScope(IJvmTypeProvider typeProvider,
                                                  com.google.common.base.Predicate<IEObjectDescription> filter)

createConstructorScope

public abstract AbstractConstructorScope createConstructorScope(IJvmTypeProvider typeProvider,
                                                                com.google.common.base.Predicate<IEObjectDescription> filter)

getTypeProviderFactory

public abstract IJvmTypeProvider.Factory getTypeProviderFactory()

createMemberScope

public IScope createMemberScope(JvmType containerType,
                                com.google.common.base.Predicate<JvmMember> filter,
                                com.google.common.base.Function<JvmMember,QualifiedName> names,
                                IScope outer)