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 intSTRING_LITERAL_REFERENCE_OFFSET_SHIFTThis number determinates thatIReferenceDescription.getIndexInList()contains offset of the reference inStringLiteral.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatForStringLiteral(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator)Transform text to theStringLiteralcontent in Bsl modulestatic StringgetStringLiteralContent(String text)Gets content of theStringLiteralwithout "|"static StringgetStringLiteralContent(Collection<String> lines)Gets content of theStringLiteralwithout "|"
-
-
-
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 theStringLiteralcontent in Bsl module- Parameters:
content- transforming content, can't benulloffset- beginning position of the tranforming text inIDocumentdoc-IDocumentof the transformingStringLiteralcontent, can't benulllineSeparator- line separator to use, can't benull- Returns:
- text of the
StringLiteralwith service symbols "|", nevernull
-
getStringLiteralContent
public static String getStringLiteralContent(String text)
Gets content of theStringLiteralwithout "|"- Parameters:
text- text ofStringLiteral, can't benull- Returns:
- content of the
StringLiteralwithout "|", nevernull
-
getStringLiteralContent
public static String getStringLiteralContent(Collection<String> lines)
Gets content of theStringLiteralwithout "|"- Parameters:
lines- - string lines of theStringLiteral, can't benull- Returns:
- content of the
StringLiteralwithout "|", nevernull
-
-