Hi guys,
I am creating a UML Profile. However I have a questions. In different forums I have read that usually associations are not specified in the UML Profile, but in the model. I have the following profile where I have defined a UML Profile and I have used composition. The XText grammar generated automatically is as follows:
WorldMap returns Corona::WorldMap:
'WorldMap'
'{'
('base_Package' base_Package=[Package|EString])?
'countrycorona' '{' countrycorona+=CountryCorona ( "," countrycorona+=CountryCorona)* '}'
'}';
Another approach is to add a property to the stereotype WorldMap and add country corona as a property. The Xtext grammar generated automatically is as follows:
WorldMap returns Corona::WorldMap:
'WorldMap'
'{'
('base_Package' base_Package=[Package|EString])?
'country' country=[Corona::CountryCorona|EString]
'}';
I am more interested in the first approach, because in the second one, I should first create country corona before i can add them to the world map , while with the first one I can create them in place. Hope you understood what I mean.
Do you have any ideas about this? What would be the best solution?
Thank you!