org.eclipse.xtext.xbase.jvmmodel
Class JvmGlobalScopeProvider

java.lang.Object
  extended by org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider
      extended by org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider
          extended by org.eclipse.xtext.xbase.jvmmodel.JvmGlobalScopeProvider
All Implemented Interfaces:
IGlobalScopeProvider

public class JvmGlobalScopeProvider
extends DefaultGlobalScopeProvider

Shadows directly referrable generated Java elements from the index with inferred JVM model elements.

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
JvmGlobalScopeProvider()
           
 
Method Summary
protected  IScope getParentTypeScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<IEObjectDescription> filter, org.eclipse.emf.ecore.EClass referenceType)
           
 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.
 
Methods inherited from class org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider
createContainerScope, createContainerScopeWithContext, getCacheKey, getScope, getScope, getVisibleContainers
 
Methods inherited from class org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider
getResourceDescriptions, getScope, isIgnoreCase, setCaseInsensitivityHelper, setResourceDescriptionsProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JvmGlobalScopeProvider

public JvmGlobalScopeProvider()
Method Detail

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
Overrides:
getScope in class AbstractGlobalScopeProvider
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.

getParentTypeScope

protected IScope getParentTypeScope(org.eclipse.emf.ecore.resource.Resource resource,
                                    org.eclipse.emf.ecore.EReference reference,
                                    com.google.common.base.Predicate<IEObjectDescription> filter,
                                    org.eclipse.emf.ecore.EClass referenceType)