ThitGaRang / emf-profiles

Automatically exported from code.google.com/p/emf-profiles
0 stars 0 forks source link

Allow nesting common model elements in stereotype applications #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Users may model contained model elements in stereotypes. However he/she has no 
possibility using the UI to create the nested model elements.

Manuel suggested to visualize the stereotype applications in the corresponding 
view in terms of a tree, whereas the model elements that are contained in a 
stereotype application are shown as a child of the stereotype application.

Original issue reported on code.google.com by p.langer on 30 Nov 2011 at 2:49

GoogleCodeExporter commented 8 years ago
Once issue 21 is fixed, it would be great to look into that issue. Let me 
elaborate a bit on this one.

Profiles may contain not only stereotypes, but also normal EClasses. In fact, 
Stereotype is a subclass of EClass; thus, stereotypes may have containment 
references to other instances of EClass, which are contained in the same 
profile. If a stereotype has a containment reference to normal EClasses, an 
application of this stereotype may contain instances of other referenced 
EClass; these instances can be thought of as child elements of the stereotype 
application. The framework itself supports stereotype applications having child 
elements, however, the profile application view currently lacks the means for 
adding child elements.

As we do not generate code for profile definitions, which in that case also 
define the EClasses to which the child elements conform to, the child elements 
have to be instantiated and added as a containment of the stereotype 
application generically (cf. [1]).

Probably the easiest way to do this is to have a look at the implementation of 
the Sample Reflective Ecore editor, which allows creating dynamic instances of 
models, and integrate a similar functionality in the profile applications view.

[1] http://www.ibm.com/developerworks/library/os-eclipse-dynamicemf/

Original comment by p.langer on 10 Jul 2012 at 3:46

GoogleCodeExporter commented 8 years ago
I'll handle this one.

Original comment by bec...@gmail.com on 13 Dec 2012 at 7:59

GoogleCodeExporter commented 8 years ago
It is done.

Original comment by bec...@gmail.com on 19 Dec 2012 at 5:11