| Summary: | EObjectValidator does not support multiple inheritance validation | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Ed Willink <ed> |
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | knut.wannheden |
| Version: | 2.7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
| Whiteboard: | |||
Yes this is deliberate limitation to avoid multiple . It's similar to the limitation in org.eclipse.emf.ecore.impl.EFactoryImpl.create(EClass) which can also only create an instance of one specific concrete class. |
In EObjectValidator.validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Map<Object, Object> context) the recursion (for non-EcorePackage) to superclass is via validate(eSuperTypes.get(0), eObject, diagnostics, context); rather than a loop over all eSuperTypes, so constraints inherited from a second supertype are ignored. Is this deliberate or an oversight? It's certainly a convenient way of avoiding double validation of a constraint inherited from more than one superclass.