[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2] Re: Code generator problem with redefinitions

Thanks Lutz,

I'll have a look at the defect in detail for the next iteration of UML2.

Cheers,
- James.


"Lutz Wrage" <lwrage@xxxxxxxxxxx> wrote in message 
news:g5qet7$uh7$1@xxxxxxxxxxxxxxxxxxxx
> No need to reply to this. I've reported a bug (patch attached):
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=241411
>
> - Lutz
>
> Lutz Wrage wrote, on 7/16/2008 10:15 AM:
>> That was so misleading... Here the clarification:
>>
>> The stack overflow occurs if the feature is accessed using eGet and 
>> eIsSet, which are used in the generated editor, for example. That's where 
>> I ran into the problem.
>>
>> The generated isSet and getB methods are obviously fine, and there 
>> certainly is code to handle multiple inheritance. It seems that it's not 
>> enough, though.
>>
>> - Lutz
>>
>> Lutz Wrage wrote, on 7/16/2008 9:41 AM:
>>> Hi,
>>>
>>> I ran into the following problem when generating code from my metamodel. 
>>> It's when I use a combination of multiple inheritance an redefinition. 
>>> See the attached file for a minimal example.
>>> I have a class C that specializes two classes A and B. A and B have 
>>> properties a and b, respectively. In C I redefine both properties. I 
>>> generate code for this model (with processing duplicate features). The 
>>> generated Java implementation class CImpl extends AImpl.
>>>
>>> However, the generated code has the problem that it is impossible to get 
>>> the value of feature b in C, because eGet, etc., only go up the Java 
>>> inheritance hierarchy. Accessing C.b in any way leads to a stack 
>>> overflow. To me this looks like an oversight in the UML code generator 
>>> because it creates no code that takes UML multiple inheritance into 
>>> account for this scenario.
>>>
>>> I changed my metamodel to use subsetting instead, but that's not quite 
>>> the correct semantics in my situation.
>>>
>>> - Lutz
>>>