Class BslNStrCleanupVisitor
java.lang.Object
com.e1c.langtool.v8.dt.xtext.MultiTextEditParseTreeVisitor
com.e1c.langtool.v8.dt.bsl.cleaner.BslNStrCleanupVisitor
- All Implemented Interfaces:
ParseTreeVisitor
Visitor intended to process all
StringLiteral's passed as a first argument to the NStr() function and
- Extract all but default language into separate storage
- Generate ReplaceEdit to replace original string literal content with one, containing only message in default language
-
Field Summary
Fields inherited from class com.e1c.langtool.v8.dt.xtext.MultiTextEditParseTreeVisitor
multiTextEdit -
Constructor Summary
ConstructorsConstructorDescriptionBslNStrCleanupVisitor(org.eclipse.text.edits.MultiTextEdit multiTextEdit, org.eclipse.core.resources.IFile file, String defaultLanguageCode, Collection<? extends TranslateLanguage> languages, boolean keepLanguages, Map<TranslateLanguage, Map<ContextTranslationKey, String>> translations, ITranslationFeatureKeyProvider translationKeyProvider, IStringLiteralTypeComputer typeComputer, BslPreferences bslPreferences) Instantiates a new bsl NStr cleanup visitor. -
Method Summary
Methods inherited from class com.e1c.langtool.v8.dt.xtext.MultiTextEditParseTreeVisitor
addReplace, addReplaceIfNotEmpty, disposeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.langtool.v8.dt.xtext.ParseTreeVisitor
visit
-
Constructor Details
-
BslNStrCleanupVisitor
public BslNStrCleanupVisitor(org.eclipse.text.edits.MultiTextEdit multiTextEdit, org.eclipse.core.resources.IFile file, String defaultLanguageCode, Collection<? extends TranslateLanguage> languages, boolean keepLanguages, Map<TranslateLanguage, Map<ContextTranslationKey, String>> translations, ITranslationFeatureKeyProvider translationKeyProvider, IStringLiteralTypeComputer typeComputer, BslPreferences bslPreferences) Instantiates a new bsl NStr cleanup visitor.- Parameters:
multiTextEdit- the multi text edit, cannot benullfile- the file, cannot benulldefaultLanguageCode- Project default language code, cannot benulllanguages- Interface languages presented in project, cannot benullkeepLanguages- the languages keep mode, all languages except those specified in list of languages and the main configuration language will be cleared and deletedtranslations- Map of maps to store translation for given (Language, FeatureValue) pair, cannot benulltranslationKeyProvider- Translation key provider, cannot benulltypeComputer- the type computer, cannot benullbslPreferences- the bsl preferences, cannot benull
-
-
Method Details
-
visit
public boolean visit(org.eclipse.xtext.nodemodel.ILeafNode node)
-