mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[bug 486980] add JavaDocs to describe how to compose validators
This commit is contained in:
parent
5dd3aaf971
commit
0319d7a2b8
2 changed files with 9 additions and 0 deletions
|
@ -73,6 +73,10 @@ public abstract class AbstractInjectableValidator implements EValidator {
|
|||
|
||||
protected abstract boolean internalValidate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context);
|
||||
|
||||
/**
|
||||
* If this validator is for an EPackage you want to use in multiple languages,
|
||||
* this method should return false. Otherwise issues will be reported twice.
|
||||
*/
|
||||
public boolean isLanguageSpecific() {
|
||||
return languageName != null;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,11 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation that allows to modularize the validator into multiple classes.
|
||||
*
|
||||
* The listed validators should override the method {@link AbstractDeclarativeValidator#register(EValidatorRegistrar)}
|
||||
* with an empty implementation otherwise all issues will be reported twice.
|
||||
*
|
||||
* @author Sebastian Zarnekow - Initial contribution and API
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
Loading…
Reference in a new issue