org.eclipse.xtext.xtext
Class XtextScopeProvider
java.lang.Object
org.eclipse.xtext.scoping.impl.AbstractScopeProvider
org.eclipse.xtext.xtext.XtextScopeProvider
- All Implemented Interfaces:
- IScopeProvider
public class XtextScopeProvider
- extends AbstractScopeProvider
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XtextScopeProvider
public XtextScopeProvider()
getScope
public IScope getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
- Description copied from interface:
IScopeProvider
- Returns a scope for the given context. The scope provides access to the compatible
visible EObjects for a given reference.
- Parameters:
context
- the element from which an element shall be referenced. It doesn't need to be the element
containing the reference, it is just used to find the most inner scope for given EReference
.reference
- the reference for which to get the scope.
- 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.
createEnumLiteralsScope
protected IScope createEnumLiteralsScope(org.eclipse.emf.ecore.EEnum eEnum)
createClassifierScope
protected IScope createClassifierScope(java.lang.Iterable<org.eclipse.emf.ecore.EClassifier> classifiers)
createReferencedPackagesScope
protected IScope createReferencedPackagesScope(Grammar g)
createScope
protected IScope createScope(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EClass type)
createScope
protected IScope createScope(Grammar grammar,
org.eclipse.emf.ecore.EClass type)
createScope
protected IScope createScope(Grammar grammar,
org.eclipse.emf.ecore.EClass type,
IScope parent)
getAllGrammars
protected java.util.List<Grammar> getAllGrammars(Grammar grammar)
collectAllUsedGrammars
protected void collectAllUsedGrammars(Grammar grammar,
java.util.Collection<Grammar> visited)
createEPackageScope
protected IScope createEPackageScope(Grammar grammar,
IScope parent)
createEPackageScope
protected IScope createEPackageScope(Grammar grammar)