|
|
Re: need to change diagram and business model on save - how? [message #658724 is a reply to message #658715] |
Wed, 09 March 2011 15:48 |
Henrik Rentz-Reichert Messages: 261 Registered: July 2009 |
Senior Member |
|
|
Hi Tim,
thanks for your reply.
Yes, my problem is solved now.
I use EcoreUtil.delete() to delete unused business objects and collect the shapes that are to be removed.
Finally
for (Shape shape : toBeRemoved) {
EcoreUtil.delete(shape, true);
}
does the job (it is important to use the recursive variant!).
Thanks,
Henrik
Am 09.03.2011 16:31, schrieb Tim Kaiser:
> Hi Henrik,
>
> probably some references to the deleted objects
> still exist in your diagram.
> Example. If i have a Font without eContainer and it is referenced by a Shape via a non-containment reference, this results in a
> Dangling HREF exception on serialization; this can be solved by setting the reference to null, after the Font was detached from
> the model
> As far as i know EMF's EcoreUtil.delete() does this job for you.
>
> Does it solve your problem?
>
> Best, Tim
|
|
|
Powered by
FUDForum. Page generated in 0.02425 seconds