[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: A shortcut behaving as a node extension
|
Hi Boris,
In fact, my purpose is to consider N1 and N2 as 2 classes, with N2
inheriting from N1. That is why they are identical when created, but
become different when you start modifying N2.
But maybe it is not compatible with what exists today in GMF...
For a better understanding, here is an instantiated example of my needs:
Model instance of N1 (classic)
====================
<node name="N1">
<node name="N1.1"/>
<node name="Nx" attribute="111"/>
</node>
Model instance of N2 (the trick)
====================
<node name="N2" isInstanceOf="N1">
<node name="N2.1"/>
<node name="Nx" attribute="222"/>
</node>
Notation instance of N1 (classic)
=======================
+ N1
|--N1.1
|--Nx (attribute 111)
Notation instance of N2
=======================
+ N2
|--N1.1
|--N2.1
|--Nx (attribute 222)
Any modification with GMF editor on N1 is reported to N1's model and N1's
notation and also to N2's notation (no need to report it to N2's model as
the reference from N2 to N1 does it implicitly).
Any modification with GMF editor on N2 is reported to N2's model and N2's
notation.
It is pure inheritance between instances at the model level so there is no
need to duplicate information from N1 into N2.
The notation level resolves this inheritance by creating an instance which
is the addition of N1 and N2.
I hope you understand the need, and just would like to know if such a
mechanism is available on GMF.
If not, what would be your advice to implement that?
Thanks a lot,
Fabrice