Package com.e1c.langtool.settings
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:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe Interface ValidationContext describes the context where the value is validating. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.core.runtime.IStatusisValid(String value, FeatureValueValidator.ValidationContext context) Returns a string indicating whether the given value is valid;nullmeans valid, and non-nullmeans invalid, with the result being the error message to display to the end user.default StringpreprocessValue(String value, FeatureValueValidator.ValidationContext context) Preprocess the value before validation and set to translation storage.
-
Method Details
-
isValid
org.eclipse.core.runtime.IStatus isValid(String value, FeatureValueValidator.ValidationContext context) Returns a string indicating whether the given value is valid;nullmeans valid, and non-nullmeans 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 validatedfv- the feature valuelanguage- the language- Returns:
- the error message, or
nullindicating that the value is valid
-
preprocessValue
Preprocess the value before validation and set to translation storage.- Parameters:
value- the value to be processingcontext- the context- Returns:
- the processed string value
-