New/Reload a .genmodel [message #429894] |
Wed, 06 May 2009 13:35 |
|
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
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. 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?
Many thanks for your help,
Jorge
Jorge
|
|
|
Re: New/Reload a .genmodel [message #429896 is a reply to message #429894] |
Wed, 06 May 2009 13:39 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------020601000409050909070106
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
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>
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
>
--------------020601000409050909070106
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jorge,<br>
<br>
Comments below.<br>
<br>
Jorge Dieguez wrote:
<blockquote
cite="mid:7ba81dca8f25e482bc4b11c9642a3ccb$1@www.eclipse.org"
type="cite">Hello All,
<br>
<br>
I'm generating a viewer from "ecore diagram -> ecore ->
genmodel".
<br>
<br>
I have three classes i.e. A, B, C with references as follow:
<br>
<br>
A -> B (containment=true)
<br>
<br>
A -> C (containment=true)
<br>
<br>
B -> C (containment=False) thus, B and C child classes of A class
<br>
</blockquote>
Like Library, Book, Writer.<br>
<blockquote
cite="mid:7ba81dca8f25e482bc4b11c9642a3ccb$1@www.eclipse.org"
type="cite"><br>
if I made:
<br>
<br>
A -> C (containment=false) <br>
A -> C (containment=true(not changed)) and,
<br>
<br>
B -> C (containment=true) thus, C child of B and B child of A
<br>
<br>
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.</blockquote>
The settings in the GenFeature will not change just because you change
the model.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: New/Reload a .genmodel [message #429897 is a reply to message #429894] |
Wed, 06 May 2009 13:39 |
|
Sorry for the error in the scenario, corrected bellow:
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
> if I made:
> A -> B (containment=true(not changed))
> A -> C (containment=false) 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. 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?
> Many thanks for your help,
> Jorge
Jorge
|
|
|
|
Powered by
FUDForum. Page generated in 0.03389 seconds