Class StringLiteralValidator

All Implemented Interfaces:
ITopObjectFilter, ICheck<AbstractTranslationValidator.TranslationValidatorContext>

public class StringLiteralValidator extends AbstractTranslationValidator
  • Field Details

  • Constructor Details

    • StringLiteralValidator

      public StringLiteralValidator()
  • Method Details

    • getCheckId

      public String getCheckId()
      Description copied from interface: ICheck
      Gets the unique identifier of the check. The identifier should be unique. The system performs automated identifier conflict resolution in case of non-unique identifiers, with addition of conflict-resolving symbols to the identifier
      Returns:
      The identifier of the check. May not be null
    • configureCheck

      protected void configureCheck(BasicCheck.CheckConfigurer builder)
      Description copied from class: BasicCheck
      The check is performed in case of changes of the tracjed object model/language module changes. In order to define the rules of the check performing, the developer should define the set of EClass'es and their features those changes are being tracked/or be targets of the validation
      Overrides:
      configureCheck in class AbstractTranslationValidator
    • check

      protected void check(Object object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor)
      Description copied from class: BasicCheck
      The method that performs the check. Check results (issues) need to be placed into the result acceptor. Validation may be cancelled by a user. Complex implemantations should take this into the account and check IProgressMonitor.isCanceled() periodically during long-running operations.
      Overrides:
      check in class BasicCheck<AbstractTranslationValidator.TranslationValidatorContext>
      Parameters:
      object - The object to check, not null
      resultAcceptor - Result acceptor, not null
      parameters - The set of check execution parameters taken from check settings, not null
      monitor - Current check progress monitor, not null
    • getMessageFeature

      protected org.eclipse.emf.ecore.EStructuralFeature getMessageFeature(FeatureSettings featureSettings)
      Overrides:
      getMessageFeature in class AbstractTranslationValidator
    • getTranslation

      protected String getTranslation(org.eclipse.core.resources.IProject project, FeatureValue featureValue, TranslateLanguage language, org.eclipse.emf.ecore.EObject object, BasicCheck.ResultAcceptor resultAcceptor, ICheckParameters parameters)
      Description copied from class: AbstractTranslationValidator
      Gets the translation.
      Overrides:
      getTranslation in class AbstractTranslationValidator
      Parameters:
      project - the project
      featureValue - the feature value
      language - the language
      object - the object
      resultAcceptor - the message acceptor
      parameters - the parameters
      Returns:
      the translation