Package com._1c.g5.v8.dt.bsl.common
Class DefaultStringLiteralTextProvider
java.lang.Object
com._1c.g5.v8.dt.bsl.common.DefaultStringLiteralTextProvider
- All Implemented Interfaces:
IStringLiteralTextProvider
Default implementation of
IStringLiteralTextProvider for one source StringLiteral-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.xtext.util.Pair<StringLiteral,Integer> getLocation(int offset) Gets correspondence between location in text returned byIStringLiteralTextProvider.getText()and location in concreteStringLiteralGets all sources forIStringLiteralTextProvider.getText()StringLiteralsgetText()Gets text corresponding to theStringLiteralor concatenation ofStringLiterals
-
Constructor Details
-
DefaultStringLiteralTextProvider
Constructor- Parameters:
literal- sourceStringLiteralfor getting text, cannot benull
-
-
Method Details
-
getText
Description copied from interface:IStringLiteralTextProviderGets text corresponding to theStringLiteralor concatenation ofStringLiterals- Specified by:
getTextin interfaceIStringLiteralTextProvider- Returns:
- text corresponding to the
StringLiteralor concatenation ofStringLiterals. This text should not have special Bsl language symbols as '|'. Nevernull
-
getLocation
Description copied from interface:IStringLiteralTextProviderGets correspondence between location in text returned byIStringLiteralTextProvider.getText()and location in concreteStringLiteral- Specified by:
getLocationin interfaceIStringLiteralTextProvider- Parameters:
offset- offset in text returned byIStringLiteralTextProvider.getText()- Returns:
StringLiteraland offset in it corresponding to the offset inIStringLiteralTextProvider.getText(), can benullif offset is less zero or more or equals thenIStringLiteralTextProvider.getText()length
-
getSourceStringLiterals
Description copied from interface:IStringLiteralTextProviderGets all sources forIStringLiteralTextProvider.getText()StringLiterals- Specified by:
getSourceStringLiteralsin interfaceIStringLiteralTextProvider- Returns:
- sources for
IStringLiteralTextProvider.getText(), collection nevernull, never empty, Collection can have more the oneStringLiteralif thisIStringLiteralTextProvidercorrespondence to the concatenation ofStringLiteral
-