Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Changing remove behaviour
Changing remove behaviour [message #411335] Tue, 24 July 2007 09:55 Go to next message
Fateh SAADA KHELKHAL is currently offline Fateh SAADA KHELKHALFriend
Messages: 19
Registered: July 2009
Junior Member
Hello.

Here is my situation:

I would like to do some modifications on references of an object before removing it from my model. I tried to create a new remove command where, for example, I'd like to avoid removing the object. I was surprised that the object still there but not the references it has for other objects. I think they are removed somewhere else.

How could I "properly" avoid that?

Here is an other question: if some modifications are done some where else than in command, is this still coherent with Command Design Pattern and its purposes? this behaviour is surprising me but maybe I'm wrong?!?

Could anyone help me please?

Thanks.
Re: Changing remove behaviour [message #411340 is a reply to message #411335] Tue, 24 July 2007 11:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Fateh,

Probably you should have a look at how the DeleteCommand behaves and how
DeleteAction uses it. By default it will remove all references to the
deleted object and will use commands to do all that cleanup. You could
configure DeleteAction not to do that or to do something a little different.


Fateh SAADA KHELKHAL wrote:
> Hello.
>
> Here is my situation:
>
> I would like to do some modifications on references of an object before removing it from my model. I tried to create a new remove command where, for example, I'd like to avoid removing the object. I was surprised that the object still there but not the references it has for other objects. I think they are removed somewhere else.
>
> How could I "properly" avoid that?
>
> Here is an other question: if some modifications are done some where else than in command, is this still coherent with Command Design Pattern and its purposes? this behaviour is surprising me but maybe I'm wrong?!?
>
> Could anyone help me please?
>
> Thanks.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Changing remove behaviour [message #411348 is a reply to message #411340] Tue, 24 July 2007 12:05 Go to previous messageGo to next message
Fateh SAADA KHELKHAL is currently offline Fateh SAADA KHELKHALFriend
Messages: 19
Registered: July 2009
Junior Member
OK. Thanks a lot.
Re: Changing remove behaviour [message #411355 is a reply to message #411340] Tue, 24 July 2007 12:32 Go to previous message
Fateh SAADA KHELKHAL is currently offline Fateh SAADA KHELKHALFriend
Messages: 19
Registered: July 2009
Junior Member
Hello again.

I think I've found something that may help me: the <b>protected boolean removeAllReferencesOnDelete()</b> method in the concerned <b>ActionBarContributor</b> class. Retruning false avoid Delete Action to remove references.

Thanks again.
Previous Topic:shared node
Next Topic:dynamic extension of model
Goto Forum:
  


Current Time: Sat Apr 27 04:11:46 GMT 2024

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

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

Back to the top