Class QueryPartContentProcessor
java.lang.Object
com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractStringLiteralLinesCollector
com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractQueryPartProcessor
com.e1c.langtool.v8.dt.bsl.stringliteral.QueryPartContentProcessor
- All Implemented Interfaces:
TypedStringLiteralContentProcessor,TypedStringLiteralFeatureValueCollector
public class QueryPartContentProcessor
extends AbstractQueryPartProcessor
implements TypedStringLiteralContentProcessor
-
Field Summary
Fields inherited from class com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractQueryPartProcessor
internalizeDbViewTermsProvider, stringParserProvider, typeComputer, v8ProjectManagerFields inherited from class com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractStringLiteralLinesCollector
resourceLookup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddReplace(org.eclipse.jface.text.IDocument document, org.eclipse.text.edits.MultiTextEdit edit, org.antlr.runtime.Token token, String newKeword) static StringgetReplaceText(org.eclipse.xtext.Keyword keyword, ScriptVariant sv) booleanisSupport(StringLiteral literal, Collection<LiteralType> types) Checks if processor is support given literal and it's types.process(StringLiteral literal, Collection<LiteralType> types, IProjectTranslationProvider translationProvider, TranslateLanguage language, org.eclipse.xtext.util.CancelIndicator monitor) Process string literal lines.Methods inherited from class com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractQueryPartProcessor
collectContent, createCommentContextTranslationKey, createKeyContextTranslationKey, createStringLiteralContextTranslationKey, getCommentContent, getKey, getQlPartStringParser, getStringLiteralContent, isLinesComputedByDefaultMethods inherited from class com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractStringLiteralLinesCollector
collect, createLiteralLinesContextTranslationKey, createLiteralLinesContextTranslationKey, isComputedValue
-
Constructor Details
-
QueryPartContentProcessor
public QueryPartContentProcessor()
-
-
Method Details
-
isSupport
Description copied from interface:TypedStringLiteralContentProcessorChecks if processor is support given literal and it's types.- Specified by:
isSupportin interfaceTypedStringLiteralContentProcessor- Specified by:
isSupportin interfaceTypedStringLiteralFeatureValueCollector- Parameters:
literal- the literaltypes- the types to check- Returns:
- true, if processor is support the literal
-
process
public List<String> process(StringLiteral literal, Collection<LiteralType> types, IProjectTranslationProvider translationProvider, TranslateLanguage language, org.eclipse.xtext.util.CancelIndicator monitor) Description copied from interface:TypedStringLiteralContentProcessorProcess string literal lines. Processor should not add quotes or | to the lines. Processor should avoid return different count of lines. However, if returned lines more than source, extra lines will be append with the same indentation as last line of source literal, if returned lines less, it will leave a blank space of reduced lines.- Specified by:
processin interfaceTypedStringLiteralContentProcessor- Parameters:
literal- the literaltypes- the typestranslationProvider- the translation providerlanguage- the languagemonitor- the monitor- Returns:
- the list of lines without quotes and | for multi-line
-
getReplaceText
-
addReplace
protected void addReplace(org.eclipse.jface.text.IDocument document, org.eclipse.text.edits.MultiTextEdit edit, org.antlr.runtime.Token token, String newKeword)
-