Error while saving dynamically created nodes [message #230843] |
Wed, 20 May 2009 09:33 |
Akansha Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am developing a GMF application which consists of dynamic palette. So
whenever user clicks on a tool in palette and drop it on editor, then a
figure is created with prepopulated properties.
Suppose I have CUSTOMER and PERSON tools on palette. PERSON has an
attribute which has reference to CUSTOMER. Now when I draw PERSON and
CUSTOMER on the editor and save the diagram, then it throws exception
while saving that "Save could not be completed" and the reason it states
is "The Object (object printed) is not contained in resource".
This is happening because the CUSTOMER Node which is created is a
different object and the customer reference inside PERSON is a different
object. I am following thread
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg17149.html
for creating dynamic palette and stuff. In XXXCreateCommand.java, I have
overridden doDefaultElementCreation() method. I am calling
super.doDefaultElementCreation() in doDefaultElementCreation() which is
causing CUSTOMER and customer reference in PERSON to be different.
What shall I do? Any pointers? Is there any other way of doing it ?
Thanks,
Akansha
|
|
|
Powered by
FUDForum. Page generated in 0.02863 seconds