Package com._1c.g5.v8.dt.bsl.ui
Class BslStringLiteralUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.BslStringLiteralUtil
-
public final class BslStringLiteralUtil extends Object
This class contains useful method for formatting content of theStringLiteral
.- Restriction:
- This class is not intended to be extended by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static int
STRING_LITERAL_REFERENCE_OFFSET_SHIFT
This number determinates thatIReferenceDescription.getIndexInList()
contains offset of the reference inStringLiteral
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
formatForStringLiteral(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator)
Transform text to theStringLiteral
content in Bsl modulestatic String
getStringLiteralContent(String text)
Gets content of theStringLiteral
without "|"static String
getStringLiteralContent(Collection<String> lines)
Gets content of theStringLiteral
without "|"
-
-
-
Field Detail
-
STRING_LITERAL_REFERENCE_OFFSET_SHIFT
public static final int STRING_LITERAL_REFERENCE_OFFSET_SHIFT
This 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:
- Constant Field Values
-
-
Method Detail
-
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
public static String getStringLiteralContent(String text)
Gets content of theStringLiteral
without "|"- Parameters:
text
- text ofStringLiteral
, can't benull
- Returns:
- content of the
StringLiteral
without "|", nevernull
-
getStringLiteralContent
public static String getStringLiteralContent(Collection<String> lines)
Gets content of theStringLiteral
without "|"- Parameters:
lines
- - string lines of theStringLiteral
, can't benull
- Returns:
- content of the
StringLiteral
without "|", nevernull
-
-