Class BslNStrCleanupVisitor

java.lang.Object
com.e1c.langtool.v8.dt.xtext.MultiTextEditParseTreeVisitor
com.e1c.langtool.v8.dt.bsl.cleaner.BslNStrCleanupVisitor
All Implemented Interfaces:
ParseTreeVisitor

public class BslNStrCleanupVisitor extends MultiTextEditParseTreeVisitor
Visitor intended to process all StringLiteral's passed as a first argument to the NStr() function and
  1. Extract all but default language into separate storage
  2. Generate ReplaceEdit to replace original string literal content with one, containing only message in default language
  • 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 be null
      file - the file, cannot be null
      defaultLanguageCode - Project default language code, cannot be null
      languages - Interface languages presented in project, cannot be null
      keepLanguages - the languages keep mode, all languages except those specified in list of languages and the main configuration language will be cleared and deleted
      translations - Map of maps to store translation for given (Language, FeatureValue) pair, cannot be null
      translationKeyProvider - Translation key provider, cannot be null
      typeComputer - the type computer, cannot be null
      bslPreferences - the bsl preferences, cannot be null
  • Method Details

    • visit

      public boolean visit(org.eclipse.xtext.nodemodel.ILeafNode node)