Home » Modeling » EMF » [EMF.core] EObjectValidator does not support multiple inheritance validation
|
Re: [EMF.core] EObjectValidator does not support multiple inheritance validation [message #716887 is a reply to message #716712] |
Thu, 18 August 2011 17:15 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Ed,
I suppose, it's the best we can do when an appropriately dispatching
generated validator isn't produced. You can think of it as similar to
not being able to extend two different generated classes dynamically.
However, Kenn added support for delegates later in the evolution, and
it's a bit more problematic from that angle, i.e., in the fully dynamic
case, you'd hope all the constraints from all the supers would be
considered. I'll ask Kenn to comment...
On 18/08/2011 12:22 AM, Ed Willink wrote:
> Hi
>
> 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.
>
> Regards
>
> Ed Willink
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: [EMF.core] EObjectValidator does not support multiple inheritance validation [message #717024 is a reply to message #716887] |
Fri, 19 August 2011 05:20 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
https://bugs.eclipse.org/bugs/show_bug.cgi?id=355184 raised to better
persist comments.
Regards
Ed Willink
On 18/08/2011 18:15, Ed Merks wrote:
> Ed,
>
> I suppose, it's the best we can do when an appropriately dispatching
> generated validator isn't produced. You can think of it as similar to
> not being able to extend two different generated classes dynamically.
> However, Kenn added support for delegates later in the evolution, and
> it's a bit more problematic from that angle, i.e., in the fully
> dynamic case, you'd hope all the constraints from all the supers would
> be considered. I'll ask Kenn to comment...
>
>
> On 18/08/2011 12:22 AM, Ed Willink wrote:
>> Hi
>>
>> 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.
>>
>> Regards
>>
>> Ed Willink
>>
|
|
|
Goto Forum:
Current Time: Fri Apr 26 23:56:23 GMT 2024
Powered by FUDForum. Page generated in 0.03615 seconds
|