Community
Participate
Working Groups
Currently we are registering our EValidators to EMF's EValidator.Registry, which makes them globally available for a set of EPackage(s). When dealing with multiple or existing metamodels, it'd be nice if certain checks are only executed in the context of one specific Xtext language, i.e. in resources belonging to that language. This can also be used to avoid duplicate checks in the context of language inheritance: If a sublanguage's validator inherits from the superlanguage's validator, you can then register the validator only for resources of the respective languages to avoid duplicate check execution in the sublanguage. OTOH, the implementation of the superlanguage's validator can still rely on language specific components which are bound differently in the sublanguage. Such a situation arises with Xbase and Xtend2. Even though called from a completely different context, the ConcreteSyntaxValidator already uses a similar strategy.
Pushed to MASTER. AbstractInjectableValidator now only validates if the XtextResource of the element has the same language. This behavior can be overriden by returning false in isLanguageSpecific(). Once derived, the language name is cached in the validation context map for better performance. The ResourceValidatorImpl sets the language name in the context eagerly. Removed the equvialent mechanism in AbstractConcreteSyntaxValidator.
Closing all bugs that were set to RESOLVED before Neon.0