Jorge,
Comments below.
Jorge Dieguez wrote:
Hello All,
I'm generating a viewer from "ecore diagram -> ecore ->
genmodel".
I have three classes i.e. A, B, C with references as follow:
A -> B (containment=true)
A -> C (containment=true)
B -> C (containment=False) thus, B and C child classes of A class
Like Library, Book, Writer.
if I made:
A -> C (containment=false)
A -> C (containment=true(not changed)) and,
B -> C (containment=true) thus, C child of B and B child of A
these changes does not get reflected in the view if I reload genmodel
i.e. still depicting C and B as child classes of A.
The settings in the GenFeature will not change just because you change
the model. You have to make changes to the GenFeature Children and
Child Creation properties to have an impact on the view.
Also, If I try to save the viewer then I get:
org.eclipse.emf.ecore.xmi.DanglingHREFException: The object
'wwww.impl.EClass2Impl@1426780 (EAttribute0: null)' is not contained in
a resource.
This is solved only if I create a new model.
Can you tell me when should or should not reload be used? what's the
rationale of reload?
Reload preserves all settings. Those settings are computed
when the model is first created to produce what's likely to be the best
choices based on the structure of the model at that time. There's a
feature request to be able to reset the properties to their defaults:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=186455
Like so many things, it's not done yet.
Many thanks for your help,
Jorge
|