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 class
BslDocumentationProvider.DocumentContent.GroupTypeDescription
Contains information about group of typesstatic class
BslDocumentationProvider.DocumentContent.ParamContent
Contains information about parameter of method or constructorstatic class
BslDocumentationProvider.DocumentContent.Reference
Contains information for html referencestatic class
BslDocumentationProvider.DocumentContent.TypeContent
Contains information aboutType
context 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 benull
retValDescr
- description of the returning value of the element, can benull
retValType
- list of returning types, can benull
paramsContent
- parameters of element, can benull
syntax
- syntax of the element, can benull
envs
- actualEnvironments
of the element, can benull
typeContent
- content of the element, if it'sType
, can benull
remark
- remark for element, can benull
example
- example of using of the element, can benull
methodicalLink
- 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 benull
ifcontent
wasnull
-
getDocumentationFormatString
public static String getDocumentationFormatString(BslDocumentationProvider.DocumentContent doc)
Creates full documentation byBslDocumentationProvider.DocumentContent
for 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 benull
retValType
- 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 forParametersHoverInfoControl
by parameter description- Parameters:
doc
- actualBslDocumentationProvider.DocumentContent
for computing, can benull
retvalTypes
- string presentation of return types of parameter, can benull
description
- parameter text description, can benull
- Returns:
- weight in symbols for
ParametersHoverInfoControl
-
getHeight
public static int getHeight(String description)
Computes height in symbols forParametersHoverInfoControl
by 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
null
if no content for parameters
-
getRetValType
public List<BslDocumentationProvider.DocumentContent.GroupTypeDescription> getRetValType()
Gets return value type description- Returns:
- return value type description, can be
null
if there is no return types
-
getSyntax
public String getSyntax()
Gets element syntax documentation- Returns:
- element syntax documentation, can be
null
-
-