Validator uses fixed EPackage for constraint parsing

Issue #511 resolved
Matthias Schoettle created an issue

The ValidationRulesParser uses only the RamPackage when importing constraints in importConstraints() to retrieve the EClassifier. It needs to be language-independent, so that constraints for other packages, such as CORE, can be imported as well.

The constraints are all placed within a package <nameOfPackage> ... endpackage block, so the corresponding package should be known.

Using the nsURI, it is possible to get the EPackage from the registry.

Comments (1)

  1. Matthias Schoettle reporter

    Resolves #511: Adds retrieval of current EPackage.

    This supports constraints based on any metamodel. Since the constraints are placed within the OCL package block, its nsURI can be retrieved. This is used to load the corresponding EPackage from the registry.

    → <<cset 07dc0ebe7b2d>>

  2. Log in to comment