Class PlatformAwareGlobalScopeProvider
- java.lang.Object
-
- org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider
-
- com._1c.g5.modeling.xtext.scoping.LightDefaultGlobalScopeProvider
-
- com._1c.g5.v8.dt.platform.scoping.PlatformAwareGlobalScopeProvider
-
- All Implemented Interfaces:
org.eclipse.xtext.scoping.IGlobalScopeProvider
- Direct Known Subclasses:
BslGlobalScopeProvider
,ChartGlobalScopeProvider
,CmiGlobalScopeProvider
,DcsGlobalScopeProvider
,EventHandlersGlobalScopeProvider
,ExpressionsGlobalScopeProvider
,FormGlobalScopeProvider
,GeographicalSchemaGlobalScopeProvider
,GraphicalSchemeGlobalScopeProvider
,HpwaGlobalScopeProvider
,MdGlobalScopeProvider
,MoxelGlobalScopeProvider
,QlGlobalScopeProvider
,RightsGlobalScopeProvider
,XdtoGlobalScopeProvider
public class PlatformAwareGlobalScopeProvider extends LightDefaultGlobalScopeProvider
Imlementation ofIGlobalScopeProvider
aware of platform scope.
This scope provider attaches the platform scope as a parent to the default global scope.
Instance of this class may be used as is as a globalscope provider. Also this class can be subclassed if some special behaviour is needed. For instance if user needs to insert some special scope into the scope chain between the platform scope and the default global scope.
-
-
Constructor Summary
Constructors Constructor Description PlatformAwareGlobalScopeProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.xtext.scoping.IScope
createContainerScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.xtext.resource.IContainer container, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase)
protected org.eclipse.xtext.scoping.IScope
getDefaultGlobalScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given context.protected org.eclipse.xtext.scoping.IScope
getDefaultGlobalScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given parent scope and the given context.protected org.eclipse.xtext.scoping.IScope
getDefaultGlobalScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given parent scope and the given context.protected org.eclipse.xtext.scoping.IScope
getPlatformScope(org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, Version version)
Returns a corresponding version of platform scope for the given context.org.eclipse.xtext.scoping.IScope
getScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
void
setPlatformScopeProvider(IPlatformScopeProvider platformScopeProvider)
-
Methods inherited from class com._1c.g5.modeling.xtext.scoping.LightDefaultGlobalScopeProvider
createContainerScopeWithContext, getCacheKey, getScope, getScope, getVisibleContainers
-
-
-
-
Method Detail
-
getScope
public org.eclipse.xtext.scoping.IScope getScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
- Specified by:
getScope
in interfaceorg.eclipse.xtext.scoping.IGlobalScopeProvider
- Overrides:
getScope
in classorg.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider
-
setPlatformScopeProvider
public void setPlatformScopeProvider(IPlatformScopeProvider platformScopeProvider)
-
getPlatformScope
protected org.eclipse.xtext.scoping.IScope getPlatformScope(org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, Version version)
Returns a corresponding version of platform scope for the given context.- Parameters:
reference
- the reference for which to construct a platform scope. Can't benull
.filter
- a filter used to filter elements in the platform scope. May benull
.version
- version of platform scope, can't benull
- Returns:
- the resulting platform scope. Can't be
null
.
-
getDefaultGlobalScope
protected org.eclipse.xtext.scoping.IScope getDefaultGlobalScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given parent scope and the given context.- Parameters:
parent
- the parent scoperesource
- the resource from which the global scope is looked at.reference
- the reference for which to construct a global scope.filter
- a filter used to filter down the elements contained in each scope. Scopes will only contain elements for which the filter returnedtrue
.- Returns:
- the resulting default global scope. Can't be
null
.
-
getDefaultGlobalScope
protected org.eclipse.xtext.scoping.IScope getDefaultGlobalScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EClass type, boolean ignoreCase, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given parent scope and the given context.- Parameters:
parent
- the parent scoperesource
- the resource from which the global scope is looked at.type
- the type of elements for which to construct a global scope.filter
- a filter used to filter down the elements contained in each scope. Scopes will only contain elements for which the filter returnedtrue
.- Returns:
- the resulting default global scope. Can't be
null
.
-
getDefaultGlobalScope
protected org.eclipse.xtext.scoping.IScope getDefaultGlobalScope(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EReference reference, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter)
Returns a default global scope for the given context.- Parameters:
resource
- the resource from which the global scope is looked at.reference
- the reference for which to construct a global scope.filter
- a filter used to filter down the elements contained in each scope. Scopes will only contain elements for which the filter returnedtrue
.- Returns:
- the resulting default global scope. Can't be
null
.
-
createContainerScope
protected org.eclipse.xtext.scoping.IScope createContainerScope(org.eclipse.xtext.scoping.IScope parent, org.eclipse.xtext.resource.IContainer container, com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> filter, org.eclipse.emf.ecore.EClass type, boolean ignoreCase)
- Overrides:
createContainerScope
in classLightDefaultGlobalScopeProvider
-
-