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 SummaryFields Modifier and Type Field Description static intSTRING_LITERAL_REFERENCE_OFFSET_SHIFTThis number determinates thatIReferenceDescription.getIndexInList()contains offset of the reference inStringLiteral.
 - 
Method SummaryAll 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_SHIFTpublic 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- 
formatForStringLiteralpublic 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 be- null
- offset- beginning position of the tranforming text in- IDocument
- doc-- IDocumentof the transforming- StringLiteralcontent, can't be- null
- lineSeparator- line separator to use, can't be- null
- Returns:
- text of the StringLiteralwith service symbols "|", nevernull
 
 - 
getStringLiteralContentpublic static String getStringLiteralContent(String text) Gets content of theStringLiteralwithout "|"- Parameters:
- text- text of- StringLiteral, can't be- null
- Returns:
- content of the StringLiteralwithout "|", nevernull
 
 - 
getStringLiteralContentpublic static String getStringLiteralContent(Collection<String> lines) Gets content of theStringLiteralwithout "|"- Parameters:
- lines- - string lines of the- StringLiteral, can't be- null
- Returns:
- content of the StringLiteralwithout "|", nevernull
 
 
- 
 
-