Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » DeleteCommand and order of elements
DeleteCommand and order of elements [message #544875] Mon, 05 July 2010 19:17
Eclipse UserFriend
Originally posted by: micha.on.the.road.web.de

Hi,

I use the ComponentEditPolicy and implement createDeleteCommand()
returning a delete Command for a single object. Marking several objects
and deleting works fine but undo() mixes up the order of my models. It
is not possible to store the position to insert them properly.

I thought of a GEF bug - undo() wouldn't iterate reversely through the
list but it's not this.

The problem is that in DeleteAction a CompoundCommand is created but
every time - after on delete gets executed (caused by ... ->
handleSelectionChanged()->DeleteAction.refresh()) - it is refilled and
the order of my elements is mixed up.

So my question: what is the proper way to implement a DeleteCommand that
maintains order on undo?
Is there any way to avoid the creation of multiple DeleteCommands
embedded in a CompoundCommand? I would prefer to have one command for a
selection that deletes the list of children at once. Like this it would
be easy to maintain the order.

Thanks a lot
Michael
Previous Topic:Graph too small
Next Topic:TabbedPane
Goto Forum:
  


Current Time: Thu Apr 25 23:52:10 GMT 2024

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

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

Back to the top