Package com._1c.g5.v8.dt.bsl.ui
Class BslDocumentationProvider
java.lang.Object
com._1c.g5.v8.dt.bsl.ui.BslDocumentationProvider
Contains special methods for getting different type of context help for BSL
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Structured content template commentstatic class
Class contains documentation for the element in bsl language -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDecorToDoc
(String doc) Add special css todoc
CreatesBslDocumentationProvider.DocumentContent
byMethod
static String
createSyntax
(Method method) Gets syntax of Bsl methodgetDocByContext
(org.eclipse.help.IContext context) Gets full documentation byIContext
getDocByEObject
(org.eclipse.emf.ecore.EObject object) Gets documentation for element from model of BSLgetDocByEObjectAndOffset
(org.eclipse.emf.ecore.EObject object, Integer offset) Gets documentation for element from model of BSLgetDocContentByEObject
(org.eclipse.emf.ecore.EObject object) Gets raw documentation content for element from model of BSLgetDocContentByEObjectAndOffset
(org.eclipse.emf.ecore.EObject object, Integer offset) Gets raw documentation content for element from model of BSLgetDocFromUrl
(URL url) Gets content fromurl
getDocumentationForGroupingMethod
(Collection<org.eclipse.xtext.util.Pair<Method, TypeItem>> methods, int paramSetIndex, Version version) Gets documentation for grouping method in syntax-context listgetDocumentationForGroupingMethod
(Collection<org.eclipse.xtext.util.Pair<Method, TypeItem>> methods, int paramSetIndex, Version version, boolean needTemplate) Gets documentation for grouping method in syntax-context listgetDocumentationForGroupingProperty
(Collection<org.eclipse.xtext.util.Pair<Property, TypeItem>> properties, Version version) Gets documentation for grouping properties in syntax-context listgetDocumentationForGroupingProperty
(Collection<org.eclipse.xtext.util.Pair<Property, TypeItem>> properties, Version version, boolean needTemplate) Gets documentation for grouping properties in syntax-context listgetEnTypeName
(String name, org.eclipse.emf.ecore.resource.Resource context) Gets English name by name in different language forType
Returns dark theme css styles for Eobject hover.getFullDoc
(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Get full documentation for the element from document in positionoffset
getFullDocWithDecor
(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Gets full documentation with decoration textgetMethodicalLink
(String fullDocumentation) Gets url to methodical information by full documentation contentstatic String
getParameterizedHtmlPath
(Version version) Gets parameterized html path to help context informationgetShortDoc
(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Gets short documentationgetTypeSetNames
(org.eclipse.emf.ecore.resource.Resource resource) Gets actualTypeSet
names and their including types.getTypeSetNames
(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualTypeSet
names and their including types.getVersion
(org.eclipse.emf.ecore.EObject object) Gets corresponding project version byobject
getVersion
(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualVersion
for project byIXtextDocument
typeResolve
(List<TypeItem> retValTypes, org.eclipse.emf.ecore.resource.Resource res) Create reference toTypeItem
for documentation
-
Field Details
-
START_HTML_PATH
- See Also:
-
HTML_PATH
- See Also:
-
PARAMETERIZED_HTML_PATH
- See Also:
-
VERSION_PREFIX
- See Also:
-
PLUGINS_ROOT
- See Also:
-
RESOURCE_FOLDER
- See Also:
-
HTML_EXT
- See Also:
-
-
Constructor Details
-
BslDocumentationProvider
public BslDocumentationProvider()
-
-
Method Details
-
createSyntax
Gets syntax of Bsl method- Parameters:
method
-Method
- Returns:
- syntax string
-
typeResolve
public static List<BslDocumentationProvider.DocumentContent.Reference> typeResolve(List<TypeItem> retValTypes, org.eclipse.emf.ecore.resource.Resource res) Create reference toTypeItem
for documentation- Parameters:
retValTypes
- list ofTypeItem
res
- currentResource
- Returns:
- list of
BslDocumentationProvider.DocumentContent.Reference
or empty list, can't returnnull
-
getParameterizedHtmlPath
Gets parameterized html path to help context information- Parameters:
version
- actual project version is the parameter of the path, can't benull
- Returns:
- parameterized html path to help context information, never
null
-
getVersionSupport
- Returns:
IRuntimeVersionSupport
, nevernull
-
getEnTypeName
Gets English name by name in different language forType
- Parameters:
name
- current namecontext
- current context- Returns:
- English name of
Type
-
addDecorToDoc
Add special css todoc
- Parameters:
doc
- source text- Returns:
- decorated text
-
getDocContentByEObject
Gets raw documentation content for element from model of BSL- Parameters:
object
- model element- Returns:
- raw documentation content for given element
-
getDocContentByEObjectAndOffset
Gets raw documentation content for element from model of BSL- Parameters:
object
- model elementoffset
- actual offset- Returns:
- raw documentation content for given element
-
getDocByEObject
Gets documentation for element from model of BSL- Parameters:
object
- model element- Returns:
- documentation for given element
-
getDocByEObjectAndOffset
public BslDocumentationProvider.ShortFullDoc getDocByEObjectAndOffset(org.eclipse.emf.ecore.EObject object, Integer offset) Gets documentation for element from model of BSL- Parameters:
object
- model elementoffset
- actual offset- Returns:
- documentation for given element
-
getVersion
Gets corresponding project version byobject
- Parameters:
object
- object for getting project version, can't benull
- Returns:
- corresponding project version by
object
, nevernull
-
getShortDoc
Gets short documentation- Returns:
- documentation
-
getFullDoc
Get full documentation for the element from document in positionoffset
- Parameters:
doc
- document which contains interest elementoffset
- position of element indoc
- Returns:
- full documentation
-
getDocByContext
Gets full documentation byIContext
- Parameters:
context
- actual help context, can benull
- Returns:
- text of documentation from
context
, or empty string if documentation wasn't found orcontext
isnull
, nevernull
-
getFullDocWithDecor
Gets full documentation with decoration text- Parameters:
doc
- document which contains interest elementoffset
- position of element indoc
- Returns:
- full documentation
-
createMethodTemplateWithoutComments
CreatesBslDocumentationProvider.DocumentContent
byMethod
- Parameters:
method
- method for creatingBslDocumentationProvider.DocumentContent
- Returns:
- created
BslDocumentationProvider.DocumentContent
, nevernull
-
getVersion
Gets actualVersion
for project byIXtextDocument
- Parameters:
document
- actualIXtextDocument
, can't benull
- Returns:
- actual
Version
for project byIXtextDocument
, nevernull
. SeeIRuntimeVersionSupport.getRuntimeVersion(Resource)
-
getTypeSetNames
public Map<String,String> getTypeSetNames(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualTypeSet
names and their including types.- Parameters:
document
- actualIXtextDocument
for gettingResource
and call methodgetTypeSetNames(Resource)
, can't benull
- Returns:
- the map, where key - name of the type category name (
TypeSet
name equals to category type name), value - names of the object which has type corresponding to the category type name in key of the map through the comma. At the end of the value you can find special symbol '#' and name of the base type after it.
Attention for category "AnyRef" - the value is names of the type corresponding to the it through the comma. Also there is no special symbol '#' at the end.
Nevernull
-
getTypeSetNames
Gets actualTypeSet
names and their including types.- Parameters:
resource
- actualResource
for gettingIScope
of all producing types in project, can't benull
- Returns:
- the map, where key - name of the type category name (
TypeSet
name equals to category type name), value - names of the object which has type corresponding to the category type name in key of the map through the comma. At the end of the value you can find special symbol '#' and name of the base type after it.
Attention for category "AnyRef" - the value is names of the type corresponding to the it through the comma. Also there is no special symbol '#' at the end.
Nevernull
-
getDocFromUrl
Gets content fromurl
- Parameters:
url
- address of documentation, can benull
- Returns:
- text of documentation was read from
url
or empty string if documentation wasn't read orurl
isnull
, nevernull
-
getDocForProducingTypes
- Parameters:
url
- actualURL
for getting documentation, can't benull
version
- actual version of the project, can't benull
typeSetNames
- the map, where key - name of the type category name (TypeSet
name equals to category type name), value - names of the object which has type corresponding to the category type name in key of the map through the comma. At the end of the value you can find special symbol '#' and name of the base type after it.
Attention for category "AnyRef" - the value is names of the type corresponding to the it through the comma. Also there is no special symbol '#' at the end.
Can't benull
- Returns:
- documentation for
TypeSet
and producingType
or empty string if documentation wasn't found, nevernull
-
getDocumentationForGroupingMethod
public String getDocumentationForGroupingMethod(Collection<org.eclipse.xtext.util.Pair<Method, TypeItem>> methods, int paramSetIndex, Version version) Gets documentation for grouping method in syntax-context list- Parameters:
methods
- grouping methods from syntax-context list, can't benull
paramSetIndex
- index of theParamSet
for creating documentationversion
- actual project version, can't benull
- Returns:
- documentation for grouping method in syntax-context list, never
null
-
getDocumentationForGroupingMethod
public String getDocumentationForGroupingMethod(Collection<org.eclipse.xtext.util.Pair<Method, TypeItem>> methods, int paramSetIndex, Version version, boolean needTemplate) Gets documentation for grouping method in syntax-context list- Parameters:
methods
- grouping methods from syntax-context list, can't benull
paramSetIndex
- index of theParamSet
for creating documentationversion
- actual project version, can't benull
needTemplate
-true
if documentation should contain help context id instead real help url,false
it real hepl url in documentation- Returns:
- documentation for grouping method in syntax-context list, never
null
-
getDocumentationForGroupingProperty
public String getDocumentationForGroupingProperty(Collection<org.eclipse.xtext.util.Pair<Property, TypeItem>> properties, Version version) Gets documentation for grouping properties in syntax-context list- Parameters:
methods
- grouping properties from syntax-context list, can't benull
version
- actual project version, can't benull
- Returns:
- documentation for grouping properties in syntax-context list, never
null
-
getDocumentationForGroupingProperty
public String getDocumentationForGroupingProperty(Collection<org.eclipse.xtext.util.Pair<Property, TypeItem>> properties, Version version, boolean needTemplate) Gets documentation for grouping properties in syntax-context list- Parameters:
methods
- grouping properties from syntax-context list, can't benull
version
- actual project version, can't benull
needTemplate
-true
if documentation should contain help context id instead real help url,false
it real hepl url in documentation- Returns:
- documentation for grouping properties in syntax-context list, never
null
-
getMethodicalLink
Gets url to methodical information by full documentation content- Parameters:
fullDocumentation
- full documentation content, can't benull
- Returns:
- url to methodical information by full documentation content, never
null
. Can be empty string if there is no link to methodical information
-
getEObjectHoverDarkStyle
Returns dark theme css styles for Eobject hover.- Returns:
- dark theme css styles for Eobject hover. Can't return
null
.
-