public class ImportedNamespaceAwareLocalScopeProvider extends AbstractGlobalScopeDelegatingScopeProvider
importedNamespace
. The value of this attribute is interpreted
as qualified name to be imported. Wildcards are supported (see getWildCard()
for details).
Imports are valid for all elements in the same container and their children.
See http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping for details.Constructor and Description |
---|
ImportedNamespaceAwareLocalScopeProvider() |
ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider,
IQualifiedNameProvider qualifiedNameProvider,
IQualifiedNameConverter qualifiedNameConverter,
ICaseInsensitivityHelper caseInsensitivityHelper) |
Modifier and Type | Method and Description |
---|---|
protected ImportNormalizer |
createImportedNamespaceResolver(java.lang.String namespace,
boolean ignoreCase)
Create a new
ImportNormalizer for the given namespace. |
protected ImportScope |
createImportScope(IScope parent,
java.util.List<ImportNormalizer> namespaceResolvers,
ISelectable importFrom,
org.eclipse.emf.ecore.EClass type,
boolean ignoreCase) |
protected ImportNormalizer |
doCreateImportNormalizer(QualifiedName importedNamespace,
boolean wildcard,
boolean ignoreCase) |
protected ISelectable |
getAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource) |
protected java.util.List<ImportNormalizer> |
getImplicitImports(boolean ignoreCase) |
protected java.lang.String |
getImportedNamespace(org.eclipse.emf.ecore.EObject object) |
protected java.util.List<ImportNormalizer> |
getImportedNamespaceResolvers(org.eclipse.emf.ecore.EObject context,
boolean ignoreCase) |
protected java.lang.Object |
getKey(org.eclipse.emf.common.notify.Notifier context,
org.eclipse.emf.ecore.EReference reference) |
protected IScope |
getLocalElementsScope(IScope parent,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference) |
protected QualifiedName |
getQualifiedNameOfLocalElement(org.eclipse.emf.ecore.EObject context) |
IQualifiedNameProvider |
getQualifiedNameProvider() |
protected IScope |
getResourceScope(IScope parent,
org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference) |
protected IScope |
getResourceScope(org.eclipse.emf.ecore.resource.Resource res,
org.eclipse.emf.ecore.EReference reference) |
IScope |
getScope(org.eclipse.emf.ecore.EObject context,
org.eclipse.emf.ecore.EReference reference)
Returns a scope for the given context.
|
java.lang.String |
getWildCard() |
protected ISelectable |
internalGetAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource) |
protected java.util.List<ImportNormalizer> |
internalGetImportedNamespaceResolvers(org.eclipse.emf.ecore.EObject context,
boolean ignoreCase) |
protected boolean |
isRelativeImport() |
getGlobalScope, getGlobalScope, isIgnoreCase, setWrapper, wrap
@Inject public ImportedNamespaceAwareLocalScopeProvider()
public ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider, IQualifiedNameProvider qualifiedNameProvider, IQualifiedNameConverter qualifiedNameConverter, ICaseInsensitivityHelper caseInsensitivityHelper)
public IQualifiedNameProvider getQualifiedNameProvider()
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 getResourceScope(org.eclipse.emf.ecore.resource.Resource res, org.eclipse.emf.ecore.EReference reference)
protected java.util.List<ImportNormalizer> getImplicitImports(boolean ignoreCase)
protected IScope getResourceScope(IScope parent, org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
protected java.lang.Object getKey(org.eclipse.emf.common.notify.Notifier context, org.eclipse.emf.ecore.EReference reference)
protected java.util.List<ImportNormalizer> getImportedNamespaceResolvers(org.eclipse.emf.ecore.EObject context, boolean ignoreCase)
protected java.util.List<ImportNormalizer> internalGetImportedNamespaceResolvers(org.eclipse.emf.ecore.EObject context, boolean ignoreCase)
protected java.lang.String getImportedNamespace(org.eclipse.emf.ecore.EObject object)
protected ImportNormalizer createImportedNamespaceResolver(java.lang.String namespace, boolean ignoreCase)
ImportNormalizer
for the given namespace.namespace
- the namespace.ignoreCase
- true
if the resolver should be case insensitive.ImportNormalizer
or null
if the namespace cannot be converted to a valid
qualified name.protected ImportNormalizer doCreateImportNormalizer(QualifiedName importedNamespace, boolean wildcard, boolean ignoreCase)
protected IScope getLocalElementsScope(IScope parent, org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference)
protected ImportScope createImportScope(IScope parent, java.util.List<ImportNormalizer> namespaceResolvers, ISelectable importFrom, org.eclipse.emf.ecore.EClass type, boolean ignoreCase)
protected QualifiedName getQualifiedNameOfLocalElement(org.eclipse.emf.ecore.EObject context)
protected boolean isRelativeImport()
protected ISelectable getAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource)
protected ISelectable internalGetAllDescriptions(org.eclipse.emf.ecore.resource.Resource resource)
public java.lang.String getWildCard()