Class KeysContentProcessor
java.lang.Object
com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractStringLiteralLinesProcessor
com.e1c.langtool.v8.dt.bsl.stringliteral.KeysContentProcessor
- All Implemented Interfaces:
TypedStringLiteralContentProcessor
- Direct Known Subclasses:
ConstProcessor,DefaultStringLiteralContentProcessor,QueryParamContentProcessor,ReplaceParamContentProcessor,SettingsKeyContentProcessor,SortColumnsContentProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IResourceLookupprotected ITranslationFeatureKeyProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ContextTranslationKeycreateFeatureValue(StringLiteral literal, FeatureKey literalFeatureKey, org.eclipse.core.resources.IFile file, String key) protected StringgetKeyTranslation(String key, List<String> keysList, StringLiteral literal, FeatureKey literalFeatureKey, Environments actualEnvs, ContextDefCache contextDefCache, org.eclipse.core.resources.IFile file, IProjectTranslationProvider translationProvider, TranslateLanguage language, boolean isRussian, org.eclipse.xtext.util.CancelIndicator monitor) protected booleanisChangeDefaultLanguage(IProjectTranslationProvider translationProvider) protected booleanisChangeScriptVariant(IProjectTranslationProvider translationProvider) 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.protected voidupdateKeyCache(StringLiteral literal, Collection<LiteralType> types, List<String> lines, List<String> newLines, IProjectTranslationProvider translationProvider) protected voidupdateKeyCache(StringLiteral literal, Collection<LiteralType> types, List<org.eclipse.xtext.util.Pair<String, String>> translations, IProjectTranslationProvider translationProvider) Methods inherited from class com.e1c.langtool.v8.dt.bsl.stringliteral.AbstractStringLiteralLinesProcessor
createLinesTranslationKey, fixKeyTranslationCase, getContextLineTranslation, getLineTranslation, isStringLiteralLinesFullTranslationStoredPriority
-
Field Details
-
resourceLookup
-
translationKeyProvider
-
-
Constructor Details
-
KeysContentProcessor
public KeysContentProcessor()
-
-
Method Details
-
isSupport
Description copied from interface:TypedStringLiteralContentProcessorChecks if processor is support given literal and it's types.- 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.- Parameters:
literal- the literaltypes- the typestranslationProvider- the translation providerlanguage- the languagemonitor- the monitor- Returns:
- the list of lines without quotes and | for multi-line
-
updateKeyCache
protected void updateKeyCache(StringLiteral literal, Collection<LiteralType> types, List<String> lines, List<String> newLines, IProjectTranslationProvider translationProvider) -
updateKeyCache
protected void updateKeyCache(StringLiteral literal, Collection<LiteralType> types, List<org.eclipse.xtext.util.Pair<String, String>> translations, IProjectTranslationProvider translationProvider) -
getKeyTranslation
protected String getKeyTranslation(String key, List<String> keysList, StringLiteral literal, FeatureKey literalFeatureKey, Environments actualEnvs, ContextDefCache contextDefCache, org.eclipse.core.resources.IFile file, IProjectTranslationProvider translationProvider, TranslateLanguage language, boolean isRussian, org.eclipse.xtext.util.CancelIndicator monitor) -
getKeys
-
createFeatureValue
protected ContextTranslationKey createFeatureValue(StringLiteral literal, FeatureKey literalFeatureKey, org.eclipse.core.resources.IFile file, String key) -
isChangeScriptVariant
- Overrides:
isChangeScriptVariantin classAbstractStringLiteralLinesProcessor
-
isChangeDefaultLanguage
- Overrides:
isChangeDefaultLanguagein classAbstractStringLiteralLinesProcessor
-