| "Special" usecase, reuse same element in different diagrams [message #881927] |
Tue, 05 June 2012 10:05  |
Nikolay Manolov Messages: 2 Registered: June 2012 |
Junior Member |
|
|
Hello,
I want to use Euegenia, however I have a special usecase that may or may not be possible to realize.
I want to be able to use one element in several diagrams or several times in one diagram without duplicating it or reparenting it in the storage. Say we have something like this:
+ Problem // contains 3 classes with 2 relations between them as seen bellow, which would also all be children of Problem
+++++++++++++++++++++++++++++++++
+ Interview ----- Player ----- Game +
+++++++++++++++++++++++++++++++
+ SubProblem1 // here we reuse Interview and Player from Problem, and have an additional element
+++++++++++++++++++++++++++++++++++++++++
+ Interview ----- Player ------ someNewElement +
+++++++++++++++++++++++++++++++++++++++++
+ SubProblem2 // here someOhterElement would be a child of SubProblem2
+++++++++++++++++++++++++++++++++++++
+ Game ----- Player ------ someOtherElement +
++++++++++++++++++++++++++++++++++++++
Interview, Game and Player should be the same elements all over the project.
Now I saw that Papyrus has achieved something like that however only on the graphical part. Meaning one element can appear several times in the diagrams, but this is not reflected in the model storage.
I would like to have some kind of relation such as
Player
| (isPart)
V
SubProblem1 // the isPart relation need not be visualised, and should be generated when we place the element in the corresponding diagram/container.
So the model for the described case should look like this:
Root
->Problem
---->Interview
---->Player
------->isPart(SubProblem2) // one variant
---->Game
---->Relation(Player,Game)
---->Relation(Player,Interview)
->SubProblem1
---->someNewElement
---->isPart(Player,SubProblem1)//second variant
---->isPart(Interview, SubProblem1)
---->Relation(Player,Interview) // this relation is of the same type but not the one from Problem. It is created anew.
->SubProblem2
---->someOtherElement
....>
->isPart(Game,SubProblem2) // third variant
Where the isPart relation is placed is of no importance. There are 3 variants as you can see above.
My purpose is to be able for example to use OCL to find some element and be able to tell in which diagrams it was used, which does not seem to be possible in Papyrus.
Is this possible with Eugenia?
If not, is this possible with GMF ?
EDIT: uploaded a picture to illustrate the effect that I want to achieve.
Best Regards,
Nikolay
Attachment: Usecase4.png
(Size: 17.88KB, Downloaded 46 times)
[Updated on: Tue, 05 June 2012 10:26] Report message to a moderator
|
|
|