Class BslDocCommentSerializer

java.lang.Object
com.e1c.langtool.v8.dt.bsl.comment.BslDocCommentSerializer

public class BslDocCommentSerializer extends Object
Bsl Documentation comment model serializer. Allows to serialize comment to the string with new or old format, set up some formatting style.
  • Constructor Details

    • BslDocCommentSerializer

      public BslDocCommentSerializer()
  • Method Details

    • getSectionSpace

      public int getSectionSpace()
      Gets the line numbers of space between sections. Default is 2.
      Returns:
      the section space
    • setSectionSpace

      public void setSectionSpace(int sectionSpace)
      Sets the line numbers of space between sections. Default is 2.
      Parameters:
      sectionSpace - the new section space
    • isIgnoreLineNumbers

      public boolean isIgnoreLineNumbers()
      Checks if serializer ignores line numbers in model objects.
      Returns:
      true, if serializer is ignoring line numbers
    • setIgnoreLineNumbers

      public void setIgnoreLineNumbers(boolean ignoreLineNumbers)
      Sets serializer to ignore line numbers in model objects.
      Parameters:
      ignoreLineNumbers - the new ignore line numbers
    • serialize

      public String serialize(BslDocumentationComment docComment, boolean isRu)
      Serializes comment to the string in new format
      Parameters:
      isRu - true if need to use Russian keywords
      Returns:
      string presentation of the documentation comment, never null, if description is empty line with IBslCommentToken.LINE_STARTER will be returned
    • serialize

      public String serialize(BslDocumentationComment docComment, boolean isRu, boolean oldFormat)
      Serializes comment to the string
      Parameters:
      isRu - true if need to use Russian keywords
      oldFormat - true if string presentation must be in old format, false in new format
      Returns:
      string presentation of the documentation comment, never null, if description is empty line with IBslCommentToken.LINE_STARTER will be returned
    • serialize

      public String serialize(BslDocumentationComment docComment, boolean isRu, String lineFormatter, String indent, boolean oldFormat)
      Serializes comment to the string
      Parameters:
      isRu - true if need to use Russian keywords
      lineFormatter - symbols added before IBslCommentToken.LINE_STARTER for each line, cannot be null
      indent - symbols for indent extra fields, cannot be null
      oldFormat - true if string presentation must be in old format, false in new format
      Returns:
      string presentation of the documentation comment, never null, if description is empty line with IBslCommentToken.LINE_STARTER will be returned
    • serialize

      public String serialize(LinkPart linkPart, boolean isRu)
      Gets string presentation of the part
      Parameters:
      isRu - true if keywords of the part should be in Russian language, false if in English
      Returns:
      string presentation of the part