Package com._1c.g5.v8.dt.bsl.ui
Class BslStringLiteralUtil
java.lang.Object
com._1c.g5.v8.dt.bsl.ui.BslStringLiteralUtil
This class contains useful method for formatting content of the
StringLiteral
.- Restriction:
- This class is not intended to be extended by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
This number determinates thatIReferenceDescription.getIndexInList()
contains offset of the reference inStringLiteral
. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formatForStringLiteral
(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator) Transform text to theStringLiteral
content in Bsl modulestatic String
Gets content of theStringLiteral
without "|"static String
getStringLiteralContent
(Collection<String> lines) Gets content of theStringLiteral
without "|"
-
Field Details
-
STRING_LITERAL_REFERENCE_OFFSET_SHIFT
public static final int STRING_LITERAL_REFERENCE_OFFSET_SHIFTThis number determinates thatIReferenceDescription.getIndexInList()
contains offset of the reference inStringLiteral
. IfIReferenceDescription.getIndexInList()
less than this constant that meansIReferenceDescription.getIndexInList()
is number part of content of literal divided by dot. IfIReferenceDescription.getIndexInList()
more than this constant that meansIReferenceDescription.getIndexInList()
is offset of reference. Offset from beginning of Module: offset =IReferenceDescription.getIndexInList()
-STRING_LITERAL_REFERENCE_OFFSET_SHIFT
- See Also:
-
-
Method Details
-
formatForStringLiteral
public static String formatForStringLiteral(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator) Transform text to theStringLiteral
content in Bsl module- Parameters:
content
- transforming content, can't benull
offset
- beginning position of the tranforming text inIDocument
doc
-IDocument
of the transformingStringLiteral
content, can't benull
lineSeparator
- line separator to use, can't benull
- Returns:
- text of the
StringLiteral
with service symbols "|", nevernull
-
getStringLiteralContent
Gets content of theStringLiteral
without "|"- Parameters:
text
- text ofStringLiteral
, can't benull
- Returns:
- content of the
StringLiteral
without "|", nevernull
-
getStringLiteralContent
Gets content of theStringLiteral
without "|"- Parameters:
lines
- - string lines of theStringLiteral
, can't benull
- Returns:
- content of the
StringLiteral
without "|", nevernull
-