public class XtextScopeProvider extends AbstractScopeProvider
Constructor and Description |
---|
XtextScopeProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
collectAllUsedGrammars(Grammar grammar,
java.util.Collection<Grammar> visited) |
protected IScope |
createClassifierScope(java.lang.Iterable<org.eclipse.emf.ecore.EClassifier> classifiers) |
protected IScope |
createEnumLiteralsScope(org.eclipse.emf.ecore.EEnum eEnum) |
protected IScope |
createEPackageScope(Grammar grammar) |
protected IScope |
createEPackageScope(Grammar grammar,
IScope parent) |
protected IScope |
createReferencedPackagesScope(Grammar g) |
protected IScope |
createScope(Grammar grammar,
org.eclipse.emf.ecore.EClass type) |
protected IScope |
createScope(Grammar grammar,
org.eclipse.emf.ecore.EClass type,
IScope parent) |
protected IScope |
createScope(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EClass type) |
protected java.util.List<Grammar> |
getAllGrammars(Grammar grammar) |
IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Returns a scope for the given context.
|
public IScope getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
IScopeProvider
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.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.protected IScope createEnumLiteralsScope(org.eclipse.emf.ecore.EEnum eEnum)
protected IScope createClassifierScope(java.lang.Iterable<org.eclipse.emf.ecore.EClassifier> classifiers)
protected IScope createScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EClass type)
protected IScope createScope(Grammar grammar, org.eclipse.emf.ecore.EClass type, IScope parent)
protected void collectAllUsedGrammars(Grammar grammar, java.util.Collection<Grammar> visited)