|
|
Re: problem with displaying inheritance node in a Compartment [message #143301 is a reply to message #143281] |
Wed, 18 July 2007 15:17 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Andreas Schuster![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=andreas.schuster%40wilken.de) Messages: 27 Registered: July 2009 |
Junior Member |
|
|
hi Tex,
its a bug in the ???VisualIDRegistry within the method getNodeVisualID().
the problem is that types are listed from general to specialized.
so the first matching (super)type in the hierarchy is returned instead
of the most specialized type.
if allready commited a bug report
https://bugs.eclipse.org/bugs/show_bug.cgi?id=195272
a simple workaround is just to change the order of 'if' operations with
the types ordered from specialized to general.
andreas
Tex Twil schrieb:
> Hi again,
> I've also noticed that if I put two Compartments - one for Apples, one
> for SpecialApple - it works also fine.
> Any ideas how to solve this problem ?
>
> Thanks.
>
> "Tex Twil" <chaljan@hotmail.com> a écrit dans le message de
> news:f7ks4k$pk2$1@build.eclipse.org...
>> Hello,
>> I have a problem with displaying a "inherited" class in a compartment.
>> I place it properly but it just won't display.
>>
>> Let's say I have those classes in my model :
>>
>> Nature:
>> - trees: Tree (container reference)
>>
>> Tree:
>> -name
>> -apples: Apple (container reference)
>> -specialApples: SplecialApple (container reference)
>>
>> Apple:
>> -color
>>
>> SpecialApple
>> -specialAttribute
>>
>> The class SpecialApple "extends" the class Apple.
>>
>> In my gmfmap I have a TopNodeReference to with a NodeMapping to a
>> Tree. This NodeMapping has ChildReferences to "Apple" and
>> "SpecialApple" . It also has a Compartment Mapping with Children set
>> to Apple and SpecialApple.
>>
>> So my problem is when I run the diagram, I can place and Apple to the
>> Compartment. I can also place the SpecialApple but when I release the
>> mouse button, it just doesn't show in the diagram. If I open the xmi
>> file of the model instance, I can see the SpecialApple.
>>
>> When I remove the inheritance between the Apple and SpecialApple, it
>> works ok !!
>>
>> Any ideas ?
>>
>> Thanks a lot,
>> Tex;
>>
>>
>
|
|
|
Re: problem with displaying inheritance node in a Compartment [message #143410 is a reply to message #143301] |
Thu, 19 July 2007 09:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Tex Twil![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=chaljan%40hotmail.com) Messages: 179 Registered: July 2009 |
Senior Member |
|
|
Hi Andreas,
Thank you for your hint, it helped.
Tex
"A.Schuster" <a.schuster@exxcellent.de> a écrit dans le message de
news:f7lavi$ve3$1@build.eclipse.org...
> hi Tex,
>
> its a bug in the ???VisualIDRegistry within the method getNodeVisualID().
> the problem is that types are listed from general to specialized.
> so the first matching (super)type in the hierarchy is returned instead of
> the most specialized type.
> if allready commited a bug report
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=195272
> a simple workaround is just to change the order of 'if' operations with
> the types ordered from specialized to general.
>
> andreas
>
> Tex Twil schrieb:
>> Hi again,
>> I've also noticed that if I put two Compartments - one for Apples, one
>> for SpecialApple - it works also fine.
>> Any ideas how to solve this problem ?
>>
>> Thanks.
>>
>> "Tex Twil" <chaljan@hotmail.com> a écrit dans le message de
>> news:f7ks4k$pk2$1@build.eclipse.org...
>>> Hello,
>>> I have a problem with displaying a "inherited" class in a compartment. I
>>> place it properly but it just won't display.
>>>
>>> Let's say I have those classes in my model :
>>>
>>> Nature:
>>> - trees: Tree (container reference)
>>>
>>> Tree:
>>> -name
>>> -apples: Apple (container reference)
>>> -specialApples: SplecialApple (container reference)
>>>
>>> Apple:
>>> -color
>>>
>>> SpecialApple
>>> -specialAttribute
>>>
>>> The class SpecialApple "extends" the class Apple.
>>>
>>> In my gmfmap I have a TopNodeReference to with a NodeMapping to a Tree.
>>> This NodeMapping has ChildReferences to "Apple" and "SpecialApple" . It
>>> also has a Compartment Mapping with Children set to Apple and
>>> SpecialApple.
>>>
>>> So my problem is when I run the diagram, I can place and Apple to the
>>> Compartment. I can also place the SpecialApple but when I release the
>>> mouse button, it just doesn't show in the diagram. If I open the xmi
>>> file of the model instance, I can see the SpecialApple.
>>>
>>> When I remove the inheritance between the Apple and SpecialApple, it
>>> works ok !!
>>>
>>> Any ideas ?
>>>
>>> Thanks a lot,
>>> Tex;
>>>
>>>
>>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07261 seconds