Class AbstractNamedValidator
java.lang.Object
com.e1c.langtool.v8.dt.validation.AbstractNamedValidator
- All Implemented Interfaces:
FeatureValueValidator
- Direct Known Subclasses:
CamelCaseContentValidator,CamelCaseFeatureValidator
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.e1c.langtool.settings.FeatureValueValidator
FeatureValueValidator.ValidationContext -
Field Summary
Fields -
Constructor Summary
Constructors -
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.protected abstract booleanisValidFeatureSettings(FeatureSettings featureSettings) protected static booleanisValidName(String value) preprocessValue(String value, FeatureValueValidator.ValidationContext context) Preprocess the value before validation and set to translation storage.
-
Field Details
-
DOT_SPLIT
- See Also:
-
NAME_REPLACE_CHARS
RegEx to split string by words: [\/\\\?\.,;&#!\ %\|\-'`"ΚΌ]- See Also:
-
-
Constructor Details
-
AbstractNamedValidator
public AbstractNamedValidator()
-
-
Method Details
-
isValidName
-
isValidFeatureSettings
-
isValid
public org.eclipse.core.runtime.IStatus isValid(String value, FeatureValueValidator.ValidationContext context) Description copied from interface:FeatureValueValidatorReturns 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.
- Specified by:
isValidin interfaceFeatureValueValidator- Parameters:
value- the translated value to be validated- Returns:
- the error message, or
nullindicating that the value is valid
-
preprocessValue
Description copied from interface:FeatureValueValidatorPreprocess the value before validation and set to translation storage.- Specified by:
preprocessValuein interfaceFeatureValueValidator- Parameters:
value- the value to be processingcontext- the context- Returns:
- the processed string value
-