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 intThis number determinates thatIReferenceDescription.getIndexInList()contains offset of the reference inStringLiteral. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringformatForStringLiteral(String content, int offset, org.eclipse.jface.text.IDocument doc, String lineSeparator) Transform text to theStringLiteralcontent in Bsl modulestatic StringGets content of theStringLiteralwithout "|"static StringgetStringLiteralContent(Collection<String> lines) Gets content of theStringLiteralwithout "|"
-
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 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
Gets content of theStringLiteralwithout "|"- Parameters:
text- text ofStringLiteral, can't benull- Returns:
- content of the
StringLiteralwithout "|", nevernull
-
getStringLiteralContent
Gets content of theStringLiteralwithout "|"- Parameters:
lines- - string lines of theStringLiteral, can't benull- Returns:
- content of the
StringLiteralwithout "|", nevernull
-