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 classStructured content template commentstatic classClass contains documentation for the element in bsl language -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDecorToDoc(String doc) Add special css todocCreatesBslDocumentationProvider.DocumentContentbyMethodstatic StringcreateSyntax(Method method) Gets syntax of Bsl methodgetDocByContext(org.eclipse.help.IContext context) Gets full documentation byIContextgetDocByEObject(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 fromurlgetDocumentationForGroupingMethod(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 forTypeReturns 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 positionoffsetgetFullDocWithDecor(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 StringgetParameterizedHtmlPath(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 actualTypeSetnames and their including types.getTypeSetNames(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualTypeSetnames and their including types.getVersion(org.eclipse.emf.ecore.EObject object) Gets corresponding project version byobjectgetVersion(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualVersionfor project byIXtextDocumenttypeResolve(List<TypeItem> retValTypes, org.eclipse.emf.ecore.resource.Resource res) Create reference toTypeItemfor 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 toTypeItemfor documentation- Parameters:
retValTypes- list ofTypeItemres- currentResource- Returns:
- list of
BslDocumentationProvider.DocumentContent.Referenceor 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 orcontextisnull, nevernull
-
getFullDocWithDecor
Gets full documentation with decoration text- Parameters:
doc- document which contains interest elementoffset- position of element indoc- Returns:
- full documentation
-
createMethodTemplateWithoutComments
CreatesBslDocumentationProvider.DocumentContentbyMethod- Parameters:
method- method for creatingBslDocumentationProvider.DocumentContent- Returns:
- created
BslDocumentationProvider.DocumentContent, nevernull
-
getVersion
Gets actualVersionfor project byIXtextDocument- Parameters:
document- actualIXtextDocument, can't benull- Returns:
- actual
Versionfor project byIXtextDocument, nevernull. SeeIRuntimeVersionSupport.getRuntimeVersion(Resource)
-
getTypeSetNames
public Map<String,String> getTypeSetNames(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualTypeSetnames and their including types.- Parameters:
document- actualIXtextDocumentfor gettingResourceand call methodgetTypeSetNames(Resource), can't benull- Returns:
- the map, where key - name of the type category name (
TypeSetname 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 actualTypeSetnames and their including types.- Parameters:
resource- actualResourcefor gettingIScopeof all producing types in project, can't benull- Returns:
- the map, where key - name of the type category name (
TypeSetname 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
urlor empty string if documentation wasn't read orurlisnull, nevernull
-
getDocForProducingTypes
- Parameters:
url- actualURLfor getting documentation, can't benullversion- actual version of the project, can't benulltypeSetNames- the map, where key - name of the type category name (TypeSetname 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
TypeSetand producingTypeor 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 benullparamSetIndex- index of theParamSetfor 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 benullparamSetIndex- index of theParamSetfor creating documentationversion- actual project version, can't benullneedTemplate-trueif documentation should contain help context id instead real help url,falseit 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 benullversion- 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 benullversion- actual project version, can't benullneedTemplate-trueif documentation should contain help context id instead real help url,falseit 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.
-