Class SingleLineModelValidator

java.lang.Object
com.e1c.langtool.v8.dt.validation.SingleLineModelValidator
All Implemented Interfaces:
FeatureValueValidator

public class SingleLineModelValidator extends Object implements FeatureValueValidator
  • Constructor Details

    • SingleLineModelValidator

      public SingleLineModelValidator()
  • Method Details

    • isValid

      public org.eclipse.core.runtime.IStatus isValid(String value, FeatureValueValidator.ValidationContext context)
      Description copied from interface: FeatureValueValidator
      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.

      Specified by:
      isValid in interface FeatureValueValidator
      Parameters:
      value - the translated value to be validated
      Returns:
      the error message, or null indicating that the value is valid
    • preprocessValue

      public String preprocessValue(String value, FeatureValueValidator.ValidationContext context)
      Description copied from interface: FeatureValueValidator
      Preprocess the value before validation and set to translation storage.
      Specified by:
      preprocessValue in interface FeatureValueValidator
      Parameters:
      value - the value to be processing
      context - the context
      Returns:
      the processed string value