Interface FeatureValueValidator

All Known Implementing Classes:
AbstractNamedValidator, BslKeywordNameValidator, CamelCaseContentValidator, CamelCaseFeatureValidator, CompositeValidator, SingleLineModelValidator, StringLiteralLinesValidator, StringLiteralParamValidator, UniqueTranslationValidator

public interface FeatureValueValidator
An interface for validating a translation of FeatureValue input.

This interface should be implemented by classes that wish to act as cell editor validators.

See Also:
  • Method Details

    • isValid

      org.eclipse.core.runtime.IStatus isValid(String value, FeatureValueValidator.ValidationContext context)
      Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end user.

      It is the responsibility of the implementor to fully format the message before returning it.

      Parameters:
      value - the translated value to be validated
      fv - the feature value
      language - the language
      Returns:
      the error message, or null indicating that the value is valid
    • preprocessValue

      default String preprocessValue(String value, FeatureValueValidator.ValidationContext context)
      Preprocess the value before validation and set to translation storage.
      Parameters:
      value - the value to be processing
      context - the context
      Returns:
      the processed string value