Class AbstractTypeProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.platform.core.typeinfo.AbstractTypeProvider
-
- All Implemented Interfaces:
ITypeProvider
- Direct Known Subclasses:
FormTypeProvider
,MdTypeProvider
,MoxelTypeProvider
public abstract class AbstractTypeProvider extends Object implements ITypeProvider
Abstract implementation ofITypeProvider
. Contains useful methods for creatingTypeDescriptionInfoWithTypeInfo
byTypeDescriptionInfoWithCategories
. SeegetTypeDescriptionInfoWithTypeInfo(EObject, EReference, IScope)
. Also it has method for computing actual project versiongetVersion(EObject)
and actual typeIScope
getAllTypesScope(EObject, IScope)
-
-
Field Summary
Fields Modifier and Type Field Description protected ITypeInfoCategoryServiceProvider
categoryProvider
protected org.eclipse.xtext.scoping.IGlobalScopeProvider
globalScopeProvider
protected IRuntimeVersionSupport
versionSupport
-
Constructor Summary
Constructors Constructor Description AbstractTypeProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addMobileAppIntersectCategory(TypeDescriptionInfoWithCategories typeDescriptionInfo)
Adds 'MobileAppTypeInfoCategory' toTypeDescriptionInfoWithCategories
intersect categories if it is notnull
protected org.eclipse.xtext.scoping.IScope
getAllTypesScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EObject parentContext, org.eclipse.xtext.scoping.IScope cachedScope)
protected org.eclipse.xtext.scoping.IScope
getAllTypesScope(org.eclipse.emf.ecore.EObject context, org.eclipse.xtext.scoping.IScope cachedScope)
abstract org.eclipse.core.resources.IProject
getContextProject(org.eclipse.emf.ecore.EObject context)
Gets actual object by contextEObject
protected com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription>
getFilters()
GetsIScope
filterTypeDescriptionInfoWithTypeInfo
getTypeDescriptionInfoWithTypeInfo(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EObject parentContext, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScope cachedScope)
Method returns actualTypeDescriptionInfoWithTypeInfo
to pair eObject-context and reference from registered type providersTypeDescriptionInfoWithTypeInfo
getTypeDescriptionInfoWithTypeInfo(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScope cachedScope)
Method returns actualTypeDescriptionInfoWithTypeInfo
to pair eObject-context and reference from registered type providersprotected Version
getVersion(org.eclipse.emf.ecore.EObject context)
Gets actual project version bycontext
object-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.platform.core.typeinfo.ITypeProvider
getTypeDescriptionInfo
-
-
-
-
Field Detail
-
categoryProvider
@Inject protected ITypeInfoCategoryServiceProvider categoryProvider
-
globalScopeProvider
@Inject protected org.eclipse.xtext.scoping.IGlobalScopeProvider globalScopeProvider
-
versionSupport
@Inject protected IRuntimeVersionSupport versionSupport
-
-
Method Detail
-
getTypeDescriptionInfoWithTypeInfo
public TypeDescriptionInfoWithTypeInfo getTypeDescriptionInfoWithTypeInfo(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScope cachedScope)
Description copied from interface:ITypeProvider
Method returns actualTypeDescriptionInfoWithTypeInfo
to pair eObject-context and reference from registered type providers- Specified by:
getTypeDescriptionInfoWithTypeInfo
in interfaceITypeProvider
- Parameters:
context
- eObject context, cannot benull
reference
- the type feature, cannot benull
cachedScope
- the cached scope, can benull
if cache is not used- Returns:
- rules in
TypeDescriptionInfo
, cannot benull
-
getTypeDescriptionInfoWithTypeInfo
public TypeDescriptionInfoWithTypeInfo getTypeDescriptionInfoWithTypeInfo(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EObject parentContext, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScope cachedScope)
Description copied from interface:ITypeProvider
Method returns actualTypeDescriptionInfoWithTypeInfo
to pair eObject-context and reference from registered type providers- Specified by:
getTypeDescriptionInfoWithTypeInfo
in interfaceITypeProvider
- Parameters:
context
- eObject context, cannot benull
reference
- the type feature, cannot benull
cachedScope
- the cached scope, can benull
if cache is not used- Returns:
- rules in
TypeDescriptionInfo
, cannot benull
-
getContextProject
public abstract org.eclipse.core.resources.IProject getContextProject(org.eclipse.emf.ecore.EObject context)
Gets actual object by contextEObject
- Parameters:
context
- contextEObject
, cannot benull
- Returns:
- context
IProject
ornull
if there is noIProject
-
getVersion
protected Version getVersion(org.eclipse.emf.ecore.EObject context)
Gets actual project version bycontext
object- Parameters:
context
- context object for computingTypeDescriptionInfo
, can't benull
- Returns:
- actual project version by
context
object, nevernull
-
getFilters
protected com.google.common.base.Predicate<org.eclipse.xtext.resource.IEObjectDescription> getFilters()
GetsIScope
filter- Returns:
IScope
filter, may benull
if there is no filter
-
getAllTypesScope
protected org.eclipse.xtext.scoping.IScope getAllTypesScope(org.eclipse.emf.ecore.EObject context, org.eclipse.xtext.scoping.IScope cachedScope)
- Parameters:
context
- context object for computingTypeDescriptionInfo
, can't benull
cachedScope
- cached scope, may benull
if there is no ot- Returns:
- actual type
IScope
for creatingTypeInfo
inTypeDescriptionInfoWithTypeInfo
, nevernull
-
getAllTypesScope
protected org.eclipse.xtext.scoping.IScope getAllTypesScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EObject parentContext, org.eclipse.xtext.scoping.IScope cachedScope)
- Parameters:
context
- context object for computingTypeDescriptionInfo
, can't benull
parentContext
- parent context object for computingTypeDescriptionInfo
, can benull
cachedScope
- cached scope, may benull
if there is no ot- Returns:
- actual type
IScope
for creatingTypeInfo
inTypeDescriptionInfoWithTypeInfo
, nevernull
-
addMobileAppIntersectCategory
protected void addMobileAppIntersectCategory(TypeDescriptionInfoWithCategories typeDescriptionInfo)
Adds 'MobileAppTypeInfoCategory' toTypeDescriptionInfoWithCategories
intersect categories if it is notnull
- Parameters:
typeDescriptionInfo
- theTypeDescriptionInfoWithCategories
, can benull
-
-