|
|
|
|
|
|
|
Re: ChangeRecorder and eConntainer [message #419880 is a reply to message #419878] |
Tue, 10 June 2008 20:23 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------060508080003010101030300
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
An,
The value feature of the map entry isn't a containment
/**
* Returns the meta object for class '{@link java.util.Map.Entry
<em>EString To Address Map Entry</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>EString To Address Map
Entry</em>'.
* @see java.util.Map.Entry
* @model keyDataType="org.eclipse.emf.ecore.EString"
* valueType="emf.test.Address"
* @generated
*/
EClass getEStringToAddressMapEntry();
So the change recorder doesn't end up being attached to the address
object because it only attaches itself to the contained children. If
you change that to be containment, the test almost works except the
parent of the eObject, which is an Address, is actually an
EStringToAddressMapEntryImpl and the eContainer of that will be the Person:
assertTrue (eObject.eContainer() instanceof PersonImpl);
An wrote:
> Ed,
>
> I created a very basic test (attachment enclosed). I am not getting any object changes if I didn't flat out the model. Can you tell if i am missing something? Thanks.
--------------060508080003010101030300
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
An,<br>
<br>
The value feature of the map entry isn't a containment<br>
<blockquote><small> /**</small><br>
<small> * Returns the meta object for class '{@link
java.util.Map.Entry <em>EString To Address Map Entry</em>}'.</small><br>
<small> * <!-- begin-user-doc --></small><br>
<small> * <!-- end-user-doc --></small><br>
<small> * @return the meta object for class '<em>EString To
Address Map Entry</em>'.</small><br>
<small> * @see java.util.Map.Entry</small><br>
<small> * @model keyDataType="org.eclipse.emf.ecore.EString"</small><br>
<small> *   ; valueType="emf.test.Address"</small><br>
<small> * @generated</small><br>
<small> */</small><br>
<small> EClass getEStringToAddressMapEntry();</small><br>
</blockquote>
So the change recorder doesn't end up being attached to the address
object because it only attaches itself to the contained children. If
you change that to be containment, the test almost works except the
parent of the eObject, which is an Address, is actually an
EStringToAddressMapEntryImpl and the eContainer of that will be the
Person:<br>
<br>
assertTrue (eObject.eContainer() instanceof PersonImpl); <br>
<br>
An wrote:
<blockquote
cite="mid:12857703.8911213117519052.JavaMail.root@cp1.dzone.com"
type="cite">
<pre wrap="">Ed,
I created a very basic test (attachment enclosed). I am not getting any object changes if I didn't flat out the model. Can you tell if i am missing something? Thanks.</pre>
</blockquote>
<br>
</body>
</html>
--------------060508080003010101030300--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03904 seconds