Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how to handle deletion in one way reference(during the object deleting, how to handle the one way reference is cleaned)
how to handle deletion in one way reference [message #1100442] Tue, 03 September 2013 05:55 Go to next message
litao Mising name is currently offline litao Mising nameFriend
Messages: 3
Registered: July 2009
Junior Member
Hello.

I have one way reference in my model file, the reference comes from source object and points to the ID of the target objects. but when I delete the target object, the reference id still exists in source object. is there any way EMF can handle this one way reference clean during an EObject is removed.

Thanks.
Re: how to handle deletion in one way reference [message #1100459 is a reply to message #1100442] Tue, 03 September 2013 06:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
What do you mean by "delete". You're using a DeleteCommand or
EcoreUtil.delete? In either case, it must be possible from the resource
set to find all references to that object to clean them up...

On 03/09/2013 7:55 AM, litao Mising name wrote:
> Hello.
>
> I have one way reference in my model file, the reference comes from
> source object and points to the ID of the target objects. but when I
> delete the target object, the reference id still exists in source
> object. is there any way EMF can handle this one way reference clean
> during an EObject is removed.
>
> Thanks.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: how to handle deletion in one way reference [message #1100465 is a reply to message #1100459] Tue, 03 September 2013 06:35 Go to previous message
litao Mising name is currently offline litao Mising nameFriend
Messages: 3
Registered: July 2009
Junior Member
Hello Ed

Using ECoreUtil.delete(EObject,Boolean) method could remove the one way reference. I should invoke it when I try to clean up all the reference. Thank you for your quick reply !

Thanks.
Previous Topic:Genmodel property "Creation sub-menus"
Next Topic:how can make static reference
Goto Forum:
  


Current Time: Fri Apr 26 16:40:29 GMT 2024

Powered by FUDForum. Page generated in 0.03251 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top