Package com._1c.g5.v8.dt.bsl.ui
Class BslDocumentationProvider.DocumentContent
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.BslDocumentationProvider.DocumentContent
-
- Enclosing class:
- BslDocumentationProvider
public static class BslDocumentationProvider.DocumentContent extends Object
Structured content template comment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBslDocumentationProvider.DocumentContent.GroupTypeDescriptionContains information about group of typesstatic classBslDocumentationProvider.DocumentContent.ParamContentContains information about parameter of method or constructorstatic classBslDocumentationProvider.DocumentContent.ReferenceContains information for html referencestatic classBslDocumentationProvider.DocumentContent.TypeContentContains information aboutTypecontext def
-
Constructor Summary
Constructors Constructor Description DocumentContent(String descr, String retValDescr, List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> retValType, List<BslDocumentationProvider.DocumentContent.ParamContent> paramsContent, String syntax, List<String> envs, BslDocumentationProvider.DocumentContent.TypeContent typeContent, String remark, String example, String methodicalLink)Constructor
-
Method Summary
-
-
-
Constructor Detail
-
DocumentContent
public DocumentContent(String descr, String retValDescr, List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> retValType, List<BslDocumentationProvider.DocumentContent.ParamContent> paramsContent, String syntax, List<String> envs, BslDocumentationProvider.DocumentContent.TypeContent typeContent, String remark, String example, String methodicalLink)
Constructor- Parameters:
descr- description of the element, can benullretValDescr- description of the returning value of the element, can benullretValType- list of returning types, can benullparamsContent- parameters of element, can benullsyntax- syntax of the element, can benullenvs- actualEnvironmentsof the element, can benulltypeContent- content of the element, if it'sType, can benullremark- remark for element, can benullexample- example of using of the element, can benullmethodicalLink- url to methodical information, can benull
-
-
Method Detail
-
parseDocument
public static BslDocumentationProvider.DocumentContent parseDocument(String content)
Parses full documentation toBslDocumentationProvider.DocumentContent- Parameters:
content- full documentation, can benull- Returns:
BslDocumentationProvider.DocumentContent, can benullifcontentwasnull
-
getDocumentationFormatString
public static String getDocumentationFormatString(BslDocumentationProvider.DocumentContent doc)
Creates full documentation byBslDocumentationProvider.DocumentContentfor object withname- Parameters:
doc- all document information, cannot benull- Returns:
- full documentation, never
null
-
getSyntaxWithTypes
public static StringBuilder getSyntaxWithTypes(String syntax, List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> retValType, boolean isDerivedType)
Gets Full syntax name of the element with types- Parameters:
syntax- syntax of the element, can benullretValType- types, can benull- Returns:
- full syntax name, never
null
-
getShortDoc
public static String getShortDoc(BslDocumentationProvider.DocumentContent doc)
Gets short documentation by content ofBslDocumentationProvider.DocumentContent- Parameters:
doc- all document information, cannot benull- Returns:
- short documentation, never
null
-
getReturnTypeStrForContentAssist
public static String getReturnTypeStrForContentAssist(List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> retValType)
Creates string description of return type name for hover in BSL- Parameters:
retValType- return value types description, cannot benull- Returns:
- format string, never
null
-
getUnknownReturnTypeStrForContentAssist
public static String getUnknownReturnTypeStrForContentAssist()
Gets representation of unknown type of returning value- Returns:
- string ">", never
null
-
getWeight
public static int getWeight(BslDocumentationProvider.DocumentContent doc, String retvalTypes, String description)
Computes weight in symbols forParametersHoverInfoControlby parameter description- Parameters:
doc- actualBslDocumentationProvider.DocumentContentfor computing, can benullretvalTypes- string presentation of return types of parameter, can benulldescription- parameter text description, can benull- Returns:
- weight in symbols for
ParametersHoverInfoControl
-
getHeight
public static int getHeight(String description)
Computes height in symbols forParametersHoverInfoControlby parameter description- Parameters:
description- parameter text description, can benull- Returns:
- height in symbols for
ParametersHoverInfoControl
-
getParamsContent
public List<BslDocumentationProvider.DocumentContent.ParamContent> getParamsContent()
Gets parameters content- Returns:
- parameters content, can be
nullif no content for parameters
-
getRetValType
public List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> getRetValType()
Gets return value type description- Returns:
- return value type description, can be
nullif there is no return types
-
getSyntax
public String getSyntax()
Gets element syntax documentation- Returns:
- element syntax documentation, can be
null
-
-