Home » Modeling » GMF (Graphical Modeling Framework) » Diagram Gen Model looks pretty backwards
Diagram Gen Model looks pretty backwards [message #46683] |
Tue, 12 September 2006 15:29 |
Eclipse User |
|
|
|
Originally posted by: liam.morley.baesystems.com
I have three basic elements in my model: Car, Plane, and Tyrannosaurus. A
Tyrannosaurus has a "ChosenVictim" car attribute
(myTyranosaurus.getChosenVictim() returns type Car). I'm using the GMF
Dashboard to create a diagram editor. Everything's going swimmingly until I
finally create the Diagram Gen Model .gmfgen file. Here's what I get (excuse
the poor ASCII tree):
| + Gen Top Level Node PlaneEditPart
| |-* Metamodel Type Car
| |-* Inner Class Viewmap PlaneFigure
....
| + Gen Top Level Node TyrannosaurusEditPart
| |-* Metamodel Type Tyrannosaurus
....
| + Gen Top Level Node CarEditPart
| |-* Metamodel Type TyrannosaurusChosenVictim
....
| + Gen Link TyrannosaurusChosenVictimEditPart
| |-* Specialization Type [THIS IS BLANK]
Am I doing something wrong, or am I going to have to manually edit the
mapping every time? If I go ahead and generate the diagram editor from here,
I drag a Plane from the palette and it's really a Car. I'm pretty confused,
I'd think I'd have to try pretty hard to get the mappings this messed up.
Liam Morley
|
|
|
Re: Diagram Gen Model looks pretty backwards [message #46889 is a reply to message #46683] |
Wed, 13 September 2006 07:02 |
Eclipse User |
|
|
|
Originally posted by: lod.staff.civ.org.pl
Hello Liam,
look at your mapping definition (gmfmap). Specifically, check whether
the Tool property entry is correct for all Node Mappings.
They sometimes get mixed-up when you copy-paste (or otherwise modify)
elements in the tooling definition.
Regards,
Mikolaj
> I have three basic elements in my model: Car, Plane, and Tyrannosaurus. A
> Tyrannosaurus has a "ChosenVictim" car attribute
> (myTyranosaurus.getChosenVictim() returns type Car). I'm using the GMF
> Dashboard to create a diagram editor. Everything's going swimmingly until I
> finally create the Diagram Gen Model .gmfgen file. Here's what I get (excuse
> the poor ASCII tree):
>
> | + Gen Top Level Node PlaneEditPart
> | |-* Metamodel Type Car
> | |-* Inner Class Viewmap PlaneFigure
> ...
> | + Gen Top Level Node TyrannosaurusEditPart
> | |-* Metamodel Type Tyrannosaurus
> ...
> | + Gen Top Level Node CarEditPart
> | |-* Metamodel Type TyrannosaurusChosenVictim
> ...
> | + Gen Link TyrannosaurusChosenVictimEditPart
> | |-* Specialization Type [THIS IS BLANK]
>
>
> Am I doing something wrong, or am I going to have to manually edit the
> mapping every time? If I go ahead and generate the diagram editor from here,
> I drag a Plane from the palette and it's really a Car. I'm pretty confused,
> I'd think I'd have to try pretty hard to get the mappings this messed up.
>
> Liam Morley
>
>
|
|
|
Re: Diagram Gen Model looks pretty backwards [message #47266 is a reply to message #46889] |
Wed, 13 September 2006 15:18 |
Eclipse User |
|
|
|
Originally posted by: liam.morley.baesystems.com
Mikolaj,
That's rather strange, I didn't make any changes to the tooling definition.
In fact, after making corrections to the diagram gen model, I still see
problems when I run the diagram plugin, but only on the palette- everything
works fine if I add things to the diagram using the hover pop-ups in the
editor itself. It seems that the palette items are mislabeled, and I'm not
sure how to fix that.
All of my classes inherit from a superclass called NamedObject which has a
'name' field. This was causing a lot of figures/labels to exist like
"NamedObjectName", "NamedObjectName2", etc. I tried flattening the
heirarchy, taking out the superclass and adding a 'name' field to each of
the subclasses. Now both the diagram editor and the palette are correct and
not mixed up, but when I create the gmfgraph and gmftool files, I don't have
the option of creating links like "chosenVictim". Do you know why that might
be?
Thanks again,
Liam
"Mikolaj Koziarkiewicz" <lod@staff.civ.org.pl> wrote in message
news:ee8af9$o9$1@utils.eclipse.org...
> Hello Liam,
>
> look at your mapping definition (gmfmap). Specifically, check whether the
> Tool property entry is correct for all Node Mappings.
>
> They sometimes get mixed-up when you copy-paste (or otherwise modify)
> elements in the tooling definition.
>
> Regards,
> Mikolaj
>
>
>> I have three basic elements in my model: Car, Plane, and Tyrannosaurus. A
>> Tyrannosaurus has a "ChosenVictim" car attribute
>> (myTyranosaurus.getChosenVictim() returns type Car). I'm using the GMF
>> Dashboard to create a diagram editor. Everything's going swimmingly until
>> I finally create the Diagram Gen Model .gmfgen file. Here's what I get
>> (excuse the poor ASCII tree):
>>
>> | + Gen Top Level Node PlaneEditPart
>> | |-* Metamodel Type Car
>> | |-* Inner Class Viewmap PlaneFigure
>> ...
>> | + Gen Top Level Node TyrannosaurusEditPart
>> | |-* Metamodel Type Tyrannosaurus
>> ...
>> | + Gen Top Level Node CarEditPart
>> | |-* Metamodel Type TyrannosaurusChosenVictim
>> ...
>> | + Gen Link TyrannosaurusChosenVictimEditPart
>> | |-* Specialization Type [THIS IS BLANK]
>>
>>
>> Am I doing something wrong, or am I going to have to manually edit the
>> mapping every time? If I go ahead and generate the diagram editor from
>> here, I drag a Plane from the palette and it's really a Car. I'm pretty
>> confused, I'd think I'd have to try pretty hard to get the mappings this
>> messed up.
>>
>> Liam Morley
|
|
|
Re: Diagram Gen Model looks pretty backwards [message #47320 is a reply to message #47266] |
Wed, 13 September 2006 17:19 |
Eclipse User |
|
|
|
Originally posted by: 5d5.mail.ru
I'd suggest to check that in every node and link mapping in gmfmap model
unique tool is specified and it is appropriate for the mapping (like
ACreationTool is selected in A node mapping). Check this also in gmfgen
model after transformation. (You may use one tool to create many nodes
but skip for now.) Use generic emf editors or text viewer to observe
your models.
Liam Morley wrote:
> Mikolaj,
> That's rather strange, I didn't make any changes to the tooling definition.
> In fact, after making corrections to the diagram gen model, I still see
> problems when I run the diagram plugin, but only on the palette- everything
> works fine if I add things to the diagram using the hover pop-ups in the
> editor itself. It seems that the palette items are mislabeled, and I'm not
> sure how to fix that.
>
> All of my classes inherit from a superclass called NamedObject which has a
> 'name' field. This was causing a lot of figures/labels to exist like
> "NamedObjectName", "NamedObjectName2", etc. I tried flattening the
> heirarchy, taking out the superclass and adding a 'name' field to each of
> the subclasses. Now both the diagram editor and the palette are correct and
> not mixed up, but when I create the gmfgraph and gmftool files, I don't have
> the option of creating links like "chosenVictim". Do you know why that might
> be?
>
> Thanks again,
> Liam
>
>
> "Mikolaj Koziarkiewicz" <lod@staff.civ.org.pl> wrote in message
> news:ee8af9$o9$1@utils.eclipse.org...
>> Hello Liam,
>>
>> look at your mapping definition (gmfmap). Specifically, check whether the
>> Tool property entry is correct for all Node Mappings.
>>
>> They sometimes get mixed-up when you copy-paste (or otherwise modify)
>> elements in the tooling definition.
>>
>> Regards,
>> Mikolaj
>>
>>
>>> I have three basic elements in my model: Car, Plane, and Tyrannosaurus. A
>>> Tyrannosaurus has a "ChosenVictim" car attribute
>>> (myTyranosaurus.getChosenVictim() returns type Car). I'm using the GMF
>>> Dashboard to create a diagram editor. Everything's going swimmingly until
>>> I finally create the Diagram Gen Model .gmfgen file. Here's what I get
>>> (excuse the poor ASCII tree):
>>>
>>> | + Gen Top Level Node PlaneEditPart
>>> | |-* Metamodel Type Car
>>> | |-* Inner Class Viewmap PlaneFigure
>>> ...
>>> | + Gen Top Level Node TyrannosaurusEditPart
>>> | |-* Metamodel Type Tyrannosaurus
>>> ...
>>> | + Gen Top Level Node CarEditPart
>>> | |-* Metamodel Type TyrannosaurusChosenVictim
>>> ...
>>> | + Gen Link TyrannosaurusChosenVictimEditPart
>>> | |-* Specialization Type [THIS IS BLANK]
>>>
>>>
>>> Am I doing something wrong, or am I going to have to manually edit the
>>> mapping every time? If I go ahead and generate the diagram editor from
>>> here, I drag a Plane from the palette and it's really a Car. I'm pretty
>>> confused, I'd think I'd have to try pretty hard to get the mappings this
>>> messed up.
>>>
>>> Liam Morley
>
>
|
|
|
Goto Forum:
Current Time: Wed Jan 15 11:53:58 GMT 2025
Powered by FUDForum. Page generated in 0.06099 seconds
|