Package com._1c.g5.v8.dt.bsl.ui
Class BslDocumentationProvider
- java.lang.Object
- 
- com._1c.g5.v8.dt.bsl.ui.BslDocumentationProvider
 
- 
 public class BslDocumentationProvider extends Object Contains special methods for getting different type of context help for BSL
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBslDocumentationProvider.DocumentContentStructured content template commentstatic classBslDocumentationProvider.ShortFullDocClass contains documentation for the element in bsl language
 - 
Field SummaryFields Modifier and Type Field Description static StringHTML_EXTstatic StringHTML_PATHstatic StringPARAMETERIZED_HTML_PATHstatic StringPLUGINS_ROOTstatic StringRESOURCE_FOLDERstatic StringSTART_HTML_PATHstatic StringVERSION_PREFIX
 - 
Constructor SummaryConstructors Constructor Description BslDocumentationProvider()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringaddDecorToDoc(String doc)Add special css todocBslDocumentationProvider.DocumentContentcreateMethodTemplateWithoutComments(Method method)CreatesBslDocumentationProvider.DocumentContentbyMethodstatic StringcreateSyntax(Method method)Gets syntax of Bsl methodStringgetDocByContext(org.eclipse.help.IContext context)Gets full documentation byIContextBslDocumentationProvider.ShortFullDocgetDocByEObject(org.eclipse.emf.ecore.EObject object)Gets documentation for element from model of BSLBslDocumentationProvider.ShortFullDocgetDocByEObjectAndOffset(org.eclipse.emf.ecore.EObject object, Integer offset)Gets documentation for element from model of BSLStringgetDocContentByEObject(org.eclipse.emf.ecore.EObject object)Gets raw documentation content for element from model of BSLStringgetDocContentByEObjectAndOffset(org.eclipse.emf.ecore.EObject object, Integer offset)Gets raw documentation content for element from model of BSLStringgetDocForProducingTypes(URL url, Version version, Map<String,String> typeSetNames)StringgetDocFromUrl(URL url)Gets content fromurlStringgetDocumentationForGroupingMethod(Collection<org.eclipse.xtext.util.Pair<Method,TypeItem>> methods, int paramSetIndex, Version version)Gets documentation for grouping method in syntax-context listStringgetDocumentationForGroupingMethod(Collection<org.eclipse.xtext.util.Pair<Method,TypeItem>> methods, int paramSetIndex, Version version, boolean needTemplate)Gets documentation for grouping method in syntax-context listStringgetDocumentationForGroupingProperty(Collection<org.eclipse.xtext.util.Pair<Property,TypeItem>> properties, Version version)Gets documentation for grouping properties in syntax-context listStringgetDocumentationForGroupingProperty(Collection<org.eclipse.xtext.util.Pair<Property,TypeItem>> properties, Version version, boolean needTemplate)Gets documentation for grouping properties in syntax-context listStringgetEnTypeName(String name, org.eclipse.emf.ecore.resource.Resource context)Gets English name by name in different language forTypeStringgetEObjectHoverDarkStyle()Returns dark theme css styles for Eobject hover.StringgetFullDoc(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset)Get full documentation for the element from document in positionoffsetStringgetFullDocWithDecor(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset)Gets full documentation with decoration textStringgetMethodicalLink(String fullDocumentation)Gets url to methodical information by full documentation contentstatic StringgetParameterizedHtmlPath(Version version)Gets parameterized html path to help context informationStringgetShortDoc(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset)Gets short documentationMap<String,String>getTypeSetNames(org.eclipse.emf.ecore.resource.Resource resource)Gets actualTypeSetnames and their including types.Map<String,String>getTypeSetNames(org.eclipse.xtext.ui.editor.model.IXtextDocument document)Gets actualTypeSetnames and their including types.VersiongetVersion(org.eclipse.emf.ecore.EObject object)Gets corresponding project version byobjectVersiongetVersion(org.eclipse.xtext.ui.editor.model.IXtextDocument document)Gets actualVersionfor project byIXtextDocumentIRuntimeVersionSupportgetVersionSupport()static List<BslDocumentationProvider.DocumentContent.Reference>typeResolve(List<TypeItem> retValTypes, org.eclipse.emf.ecore.resource.Resource res)Create reference toTypeItemfor documentation
 
- 
- 
- 
Field Detail- 
START_HTML_PATHpublic static final String START_HTML_PATH - See Also:
- Constant Field Values
 
 - 
HTML_PATHpublic static final String HTML_PATH - See Also:
- Constant Field Values
 
 - 
PARAMETERIZED_HTML_PATHpublic static final String PARAMETERIZED_HTML_PATH - See Also:
- Constant Field Values
 
 - 
VERSION_PREFIXpublic static final String VERSION_PREFIX - See Also:
- Constant Field Values
 
 - 
PLUGINS_ROOTpublic static final String PLUGINS_ROOT - See Also:
- Constant Field Values
 
 - 
RESOURCE_FOLDERpublic static final String RESOURCE_FOLDER - See Also:
- Constant Field Values
 
 - 
HTML_EXTpublic static final String HTML_EXT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
createSyntaxpublic static String createSyntax(Method method) Gets syntax of Bsl method- Parameters:
- method-- Method
- Returns:
- syntax string
 
 - 
typeResolvepublic static List<BslDocumentationProvider.DocumentContent.Reference> typeResolve(List<TypeItem> retValTypes, org.eclipse.emf.ecore.resource.Resource res) Create reference toTypeItemfor documentation- Parameters:
- retValTypes- list of- TypeItem
- res- current- Resource
- Returns:
- list of BslDocumentationProvider.DocumentContent.Referenceor empty list, can't returnnull
 
 - 
getParameterizedHtmlPathpublic static String getParameterizedHtmlPath(Version version) Gets parameterized html path to help context information- Parameters:
- version- actual project version is the parameter of the path, can't be- null
- Returns:
- parameterized html path to help context information, never null
 
 - 
getVersionSupportpublic IRuntimeVersionSupport getVersionSupport() - Returns:
- IRuntimeVersionSupport, never- null
 
 - 
getEnTypeNamepublic String getEnTypeName(String name, org.eclipse.emf.ecore.resource.Resource context) Gets English name by name in different language forType- Parameters:
- name- current name
- context- current context
- Returns:
- English name of Type
 
 - 
addDecorToDocpublic String addDecorToDoc(String doc) Add special css todoc- Parameters:
- doc- source text
- Returns:
- decorated text
 
 - 
getDocContentByEObjectpublic String getDocContentByEObject(org.eclipse.emf.ecore.EObject object) Gets raw documentation content for element from model of BSL- Parameters:
- object- model element
- Returns:
- raw documentation content for given element
 
 - 
getDocContentByEObjectAndOffsetpublic String getDocContentByEObjectAndOffset(org.eclipse.emf.ecore.EObject object, Integer offset) Gets raw documentation content for element from model of BSL- Parameters:
- object- model element
- offset- actual offset
- Returns:
- raw documentation content for given element
 
 - 
getDocByEObjectpublic BslDocumentationProvider.ShortFullDoc getDocByEObject(org.eclipse.emf.ecore.EObject object) Gets documentation for element from model of BSL- Parameters:
- object- model element
- Returns:
- documentation for given element
 
 - 
getDocByEObjectAndOffsetpublic BslDocumentationProvider.ShortFullDoc getDocByEObjectAndOffset(org.eclipse.emf.ecore.EObject object, Integer offset) Gets documentation for element from model of BSL- Parameters:
- object- model element
- offset- actual offset
- Returns:
- documentation for given element
 
 - 
getVersionpublic Version getVersion(org.eclipse.emf.ecore.EObject object) Gets corresponding project version byobject- Parameters:
- object- object for getting project version, can't be- null
- Returns:
- corresponding project version by object, nevernull
 
 - 
getShortDocpublic String getShortDoc(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Gets short documentation- Returns:
- documentation
 
 - 
getFullDocpublic String getFullDoc(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Get full documentation for the element from document in positionoffset- Parameters:
- doc- document which contains interest element
- offset- position of element in- doc
- Returns:
- full documentation
 
 - 
getDocByContextpublic String getDocByContext(org.eclipse.help.IContext context) Gets full documentation byIContext- Parameters:
- context- actual help context, can be- null
- Returns:
- text of documentation from context, or empty string if documentation wasn't found orcontextisnull, nevernull
 
 - 
getFullDocWithDecorpublic String getFullDocWithDecor(org.eclipse.xtext.ui.editor.model.IXtextDocument doc, int offset) Gets full documentation with decoration text- Parameters:
- doc- document which contains interest element
- offset- position of element in- doc
- Returns:
- full documentation
 
 - 
createMethodTemplateWithoutCommentspublic BslDocumentationProvider.DocumentContent createMethodTemplateWithoutComments(Method method) CreatesBslDocumentationProvider.DocumentContentbyMethod- Parameters:
- method- method for creating- BslDocumentationProvider.DocumentContent
- Returns:
- created BslDocumentationProvider.DocumentContent, nevernull
 
 - 
getVersionpublic Version getVersion(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualVersionfor project byIXtextDocument- Parameters:
- document- actual- IXtextDocument, can't be- null
- Returns:
- actual Versionfor project byIXtextDocument, nevernull. SeeIRuntimeVersionSupport.getRuntimeVersion(Resource)
 
 - 
getTypeSetNamespublic Map<String,String> getTypeSetNames(org.eclipse.xtext.ui.editor.model.IXtextDocument document) Gets actualTypeSetnames and their including types.- Parameters:
- document- actual- IXtextDocumentfor getting- Resourceand call method- getTypeSetNames(Resource), can't be- null
- 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
 
 - 
getTypeSetNamespublic Map<String,String> getTypeSetNames(org.eclipse.emf.ecore.resource.Resource resource) Gets actualTypeSetnames and their including types.- Parameters:
- resource- actual- Resourcefor getting- IScopeof all producing types in project, can't be- null
- 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
 
 - 
getDocFromUrlpublic String getDocFromUrl(URL url) Gets content fromurl- Parameters:
- url- address of documentation, can be- null
- Returns:
- text of documentation was read from urlor empty string if documentation wasn't read orurlisnull, nevernull
 
 - 
getDocForProducingTypespublic String getDocForProducingTypes(URL url, Version version, Map<String,String> typeSetNames) - Parameters:
- url- actual- URLfor getting documentation, can't be- null
- version- actual version of the project, can't be- null
- typeSetNames- 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 be- null
- Returns:
- documentation for TypeSetand producingTypeor empty string if documentation wasn't found, nevernull
 
 - 
getDocumentationForGroupingMethodpublic 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 be- null
- paramSetIndex- index of the- ParamSetfor creating documentation
- version- actual project version, can't be- null
- Returns:
- documentation for grouping method in syntax-context list, never null
 
 - 
getDocumentationForGroupingMethodpublic 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 be- null
- paramSetIndex- index of the- ParamSetfor creating documentation
- version- actual project version, can't be- null
- needTemplate-- 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
 
 - 
getDocumentationForGroupingPropertypublic 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 be- null
- version- actual project version, can't be- null
- Returns:
- documentation for grouping properties in syntax-context list, never null
 
 - 
getDocumentationForGroupingPropertypublic 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 be- null
- version- actual project version, can't be- null
- needTemplate-- 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
 
 - 
getMethodicalLinkpublic String getMethodicalLink(String fullDocumentation) Gets url to methodical information by full documentation content- Parameters:
- fullDocumentation- full documentation content, can't be- null
- Returns:
- url to methodical information by full documentation content, never null. Can be empty string if there is no link to methodical information
 
 - 
getEObjectHoverDarkStylepublic String getEObjectHoverDarkStyle() Returns dark theme css styles for Eobject hover.- Returns:
- dark theme css styles for Eobject hover. Can't return null.
 
 
- 
 
-