Class LinkPart
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.documentation.comment.DescriptionPart
-
- com._1c.g5.v8.dt.bsl.documentation.comment.LinkPart
-
- All Implemented Interfaces:
IDescriptionPart
public class LinkPart extends DescriptionPart
Class representIDescriptionPart
of Bsl documentation comment. It contains information about linking configuration object of method
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXTERNAL_DATA_SOURCE_CUBE
static String
EXTERNAL_DATA_SOURCE_CUBE_RU
static String
EXTERNAL_DATA_SOURCE_CUBES
static String
EXTERNAL_DATA_SOURCE_CUBES_RU
static String
EXTERNAL_DATA_SOURCE_DIMENSION_TABLE
static String
EXTERNAL_DATA_SOURCE_DIMENSION_TABLE_RU
static String
EXTERNAL_DATA_SOURCE_DIMENSION_TABLES
static String
EXTERNAL_DATA_SOURCE_DIMENSION_TABLES_RU
static String
EXTERNAL_DATA_SOURCE_TABLE
static String
EXTERNAL_DATA_SOURCE_TABLE_RU
static String
EXTERNAL_DATA_SOURCE_TABLES
static String
EXTERNAL_DATA_SOURCE_TABLES_RU
static Map<org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EStructuralFeature>
FORMS_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their formsstatic String
LINK_PART_FORM_ITEM_SEGMENT
static String
LINK_PART_FORM_ITEM_SEGMENT_RU
static String
LINK_PART_FORM_SEGMENT
static String
LINK_PART_FORM_SEGMENT_RU
static String
LINK_PART_TEMPLATE_SEGMENT
static String
LINK_PART_TEMPLATE_SEGMENT_RU
static Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference>
MD_OBJECT_MANAGERS
Correspondence between keywords of Bsl language properties of manager types container andEReference
to the configuration object collectionstatic Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference>
MD_OBJECT_MANAGERS_RU
Correspondence between keywords in Russian of Bsl language properties of manager types container andEReference
to the configuration object collectionstatic Map<org.eclipse.emf.ecore.EReference,Collection<org.eclipse.emf.ecore.EStructuralFeature>>
SUBOBJECT_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their sub objectsstatic Set<org.eclipse.emf.ecore.EReference>
SUPPORTED_MD_OBJECT_REFERENCES
Collection of the supportingEReference
to the configuration object collection available for linkingstatic Map<org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EStructuralFeature>
TEMPLATES_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their templates
-
Constructor Summary
Constructors Constructor Description LinkPart(IDescriptionPart parent, int lineNumber, int offset, String initialContent, String linkText)
Constructor.LinkPart(IDescriptionPart parent, int lineNumber, String linkText)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.emf.ecore.EObject
getActualObjectForPart(int partNumber, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EObject contextObject, BmOperationContext typeComputationContext)
Try to get actual configuration object or method corresponding to the part of the linking contentList<Method>
getExportedMethods(org.eclipse.emf.ecore.EObject actualMdObject, org.eclipse.emf.ecore.EStructuralFeature moduleFeature, BmOperationContext typeComputationContext)
String
getInitialContent()
Gets full content of theIDescriptionPart
String
getLinkText()
Gets content of the linkint
getLinkTextOffset()
Gets offset on the line of the begining link text contentMap<CaseInsensitiveString,org.eclipse.emf.ecore.EReference>
getMdObjectFirstSegment(boolean isRu)
Gets the first segment andEReference
to the object collection for linking to the configuration objectMap<CaseInsensitiveString,org.eclipse.emf.ecore.EReference>
getMdObjectManagers(boolean isRu)
Gets the first segment andEReference
to the object collection for linking to the managers type collectionList<org.eclipse.xtext.util.Pair<String,Integer>>
getPartsWithOffset()
Gets content of the link devided by the '.' and start offset of each part on the comment lineboolean
match(int lineNumber, int offset)
Checks that this description part corresponding to the concrete line number and offsetvoid
setLinkText(String linkText)
Sets content of the linkvoid
setLinkTextOffset(int offset)
Sets offset on the line of the begining link text content-
Methods inherited from class com._1c.g5.v8.dt.bsl.documentation.comment.DescriptionPart
getLineNumber, getOffset, getParent
-
-
-
-
Field Detail
-
MD_OBJECT_MANAGERS
public static final Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference> MD_OBJECT_MANAGERS
Correspondence between keywords of Bsl language properties of manager types container andEReference
to the configuration object collection
-
MD_OBJECT_MANAGERS_RU
public static final Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference> MD_OBJECT_MANAGERS_RU
Correspondence between keywords in Russian of Bsl language properties of manager types container andEReference
to the configuration object collection
-
SUPPORTED_MD_OBJECT_REFERENCES
public static final Set<org.eclipse.emf.ecore.EReference> SUPPORTED_MD_OBJECT_REFERENCES
Collection of the supportingEReference
to the configuration object collection available for linking
-
SUBOBJECT_FEATURES
public static final Map<org.eclipse.emf.ecore.EReference,Collection<org.eclipse.emf.ecore.EStructuralFeature>> SUBOBJECT_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their sub objects
-
FORMS_FEATURES
public static final Map<org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EStructuralFeature> FORMS_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their forms
-
TEMPLATES_FEATURES
public static final Map<org.eclipse.emf.ecore.EReference,org.eclipse.emf.ecore.EStructuralFeature> TEMPLATES_FEATURES
Correspondence between reference to the object that can be used in documentation comment and their templates
-
LINK_PART_FORM_SEGMENT
public static final String LINK_PART_FORM_SEGMENT
- See Also:
- Constant Field Values
-
LINK_PART_FORM_SEGMENT_RU
public static final String LINK_PART_FORM_SEGMENT_RU
- See Also:
- Constant Field Values
-
LINK_PART_FORM_ITEM_SEGMENT
public static final String LINK_PART_FORM_ITEM_SEGMENT
- See Also:
- Constant Field Values
-
LINK_PART_FORM_ITEM_SEGMENT_RU
public static final String LINK_PART_FORM_ITEM_SEGMENT_RU
- See Also:
- Constant Field Values
-
LINK_PART_TEMPLATE_SEGMENT
public static final String LINK_PART_TEMPLATE_SEGMENT
- See Also:
- Constant Field Values
-
LINK_PART_TEMPLATE_SEGMENT_RU
public static final String LINK_PART_TEMPLATE_SEGMENT_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_TABLE
public static final String EXTERNAL_DATA_SOURCE_TABLE
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_TABLE_RU
public static final String EXTERNAL_DATA_SOURCE_TABLE_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_CUBE
public static final String EXTERNAL_DATA_SOURCE_CUBE
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_CUBE_RU
public static final String EXTERNAL_DATA_SOURCE_CUBE_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_DIMENSION_TABLE
public static final String EXTERNAL_DATA_SOURCE_DIMENSION_TABLE
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_DIMENSION_TABLE_RU
public static final String EXTERNAL_DATA_SOURCE_DIMENSION_TABLE_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_TABLES
public static final String EXTERNAL_DATA_SOURCE_TABLES
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_TABLES_RU
public static final String EXTERNAL_DATA_SOURCE_TABLES_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_CUBES
public static final String EXTERNAL_DATA_SOURCE_CUBES
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_CUBES_RU
public static final String EXTERNAL_DATA_SOURCE_CUBES_RU
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_DIMENSION_TABLES
public static final String EXTERNAL_DATA_SOURCE_DIMENSION_TABLES
- See Also:
- Constant Field Values
-
EXTERNAL_DATA_SOURCE_DIMENSION_TABLES_RU
public static final String EXTERNAL_DATA_SOURCE_DIMENSION_TABLES_RU
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LinkPart
public LinkPart(IDescriptionPart parent, int lineNumber, int offset, String initialContent, String linkText)
Constructor.- Parameters:
parent
- the parent object, cannot benull
.lineNumber
- line nubmer corresponding to partoffset
- offset of the begining partinitialContent
- full content of theIDescriptionPart
, cannot benull
linkText
- content of the link, cannot benull
-
LinkPart
public LinkPart(IDescriptionPart parent, int lineNumber, String linkText)
Constructor.- Parameters:
parent
- the parent object, cannot benull
.lineNumber
- line nubmer corresponding to partlinkText
- content of the link, cannot benull
-
-
Method Detail
-
getLinkText
public String getLinkText()
Gets content of the link- Returns:
- content of the link, never
null
-
setLinkText
public void setLinkText(String linkText)
Sets content of the link- Parameters:
linkText
- content of the link, cannot benull
-
setLinkTextOffset
public void setLinkTextOffset(int offset)
Sets offset on the line of the begining link text content- Parameters:
offset
- offset on the line of the begining link text content
-
getLinkTextOffset
public int getLinkTextOffset()
Gets offset on the line of the begining link text content- Returns:
- offset on the line of the begining link text content
-
getPartsWithOffset
public List<org.eclipse.xtext.util.Pair<String,Integer>> getPartsWithOffset()
Gets content of the link devided by the '.' and start offset of each part on the comment line- Returns:
- collection of the parts of link content devided by '.' with their line offsets, never
null
-
getInitialContent
public String getInitialContent()
Gets full content of theIDescriptionPart
- Returns:
- full content of the
IDescriptionPart
, can benull
if content wasnot set
-
match
public boolean match(int lineNumber, int offset)
Description copied from interface:IDescriptionPart
Checks that this description part corresponding to the concrete line number and offset- Parameters:
lineNumber
- number of the documentation comment lineoffset
- local offset on the comment line- Returns:
true
if this description part corresponding to the send line number and offset,false
otherwise
-
getMdObjectFirstSegment
public Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference> getMdObjectFirstSegment(boolean isRu)
Gets the first segment andEReference
to the object collection for linking to the configuration object- Parameters:
isRu
-true
if the first segment should be in Russian,false
in English- Returns:
- map with the first segments and
EReference
to the object collection, nevernull
-
getMdObjectManagers
public Map<CaseInsensitiveString,org.eclipse.emf.ecore.EReference> getMdObjectManagers(boolean isRu)
Gets the first segment andEReference
to the object collection for linking to the managers type collection- Parameters:
isRu
-true
if the first segment should be in Russian,false
in English- Returns:
- map with the first segments and
EReference
to the managers type collection, nevernull
-
getActualObjectForPart
public org.eclipse.emf.ecore.EObject getActualObjectForPart(int partNumber, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EObject contextObject, BmOperationContext typeComputationContext)
Try to get actual configuration object or method corresponding to the part of the linking content- Parameters:
partNumber
- number of the linking text part for getting real object, seegetPartsWithOffset()
, range 0..getPartsWithOffset()
.size()scopeProvider
- actualIScopeProvider
, cannot benull
contextObject
- actual object for resolving, cannot benull
typeComputationContext
- Type system computation context. May not benull
- Returns:
- actual configuration object or method corresponding to the part of the linking content, can be
null
if object cannot be found
-
getExportedMethods
public List<Method> getExportedMethods(org.eclipse.emf.ecore.EObject actualMdObject, org.eclipse.emf.ecore.EStructuralFeature moduleFeature, BmOperationContext typeComputationContext)
- Parameters:
actualMdObject
- for getting module withMethod
s, cannot benull
moduleFeature
-EStructuralFeature
of the module for gettingMethod
s, cannot benull
typeComputationContext
- Type system computation context. May not benull
- Returns:
Method
s of module fromactualMdObject
and itsmoduleFeature
, nevernull
-
-