Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » drag and drop and ContainerEditPolicy ?
drag and drop and ContainerEditPolicy ? [message #468107] Tue, 04 August 2009 08:01 Go to next message
Eclipse UserFriend
Originally posted by: rune.molin.cph.dk

Hi all,

I have a question on the way ContainerEditPolicy works. I have a view
which contains editparts for "resources" and for "reservations" (I'm
using abstract terms here, the actual domain is not relevant). I want to
drag reservations from one resource to another. My resource editparts
has a ContainerEditPolicy, and getOrphanChildrenCommand and
getAddCommand are called, so the dragging and dropping actually works.

But I can't understand why orphan and add are called repeatedly when I
drag a reservation within the a new resource. Let's say I have some
lengthy background operation to perform when a reservation is dropped on
a new resource (that's probably a no-no). It would not do to invoke this
operation for every pixel the reservation is moved, would it ?

Is there some way I can implement this add a slightly higher level, so I
only generate commands when the drag'n drop process is finished ?

/Rune
Re: drag and drop and ContainerEditPolicy ? [message #468109 is a reply to message #468107] Tue, 04 August 2009 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rune.molin.cph.dk

Rune Molin wrote:
> Hi all,
>
> I have a question on the way ContainerEditPolicy works. I have a view
> which contains editparts for "resources" and for "reservations" (I'm
> using abstract terms here, the actual domain is not relevant). I want to
> drag reservations from one resource to another. My resource editparts
> has a ContainerEditPolicy, and getOrphanChildrenCommand and
> getAddCommand are called, so the dragging and dropping actually works.
>
> But I can't understand why orphan and add are called repeatedly when I
> drag a reservation within the a new resource. Let's say I have some
> lengthy background operation to perform when a reservation is dropped on
> a new resource (that's probably a no-no). It would not do to invoke this
> operation for every pixel the reservation is moved, would it ?
>
> Is there some way I can implement this add a slightly higher level, so I
> only generate commands when the drag'n drop process is finished ?
>
> /Rune

Typo: Should be "at a slightly higher level", of course
Re: drag and drop and ContainerEditPolicy ? [message #479221 is a reply to message #468107] Mon, 10 August 2009 10:18 Go to previous message
Eclipse UserFriend
Originally posted by: rune.molin.cph.dk

Bump ?

> Hi all,
>
> I have a question on the way ContainerEditPolicy works. I have a view
> which contains editparts for "resources" and for "reservations" (I'm
> using abstract terms here, the actual domain is not relevant). I want to
> drag reservations from one resource to another. My resource editparts
> has a ContainerEditPolicy, and getOrphanChildrenCommand and
> getAddCommand are called, so the dragging and dropping actually works.
>
> But I can't understand why orphan and add are called repeatedly when I
> drag a reservation within the a new resource. Let's say I have some
> lengthy background operation to perform when a reservation is dropped on
> a new resource (that's probably a no-no). It would not do to invoke this
> operation for every pixel the reservation is moved, would it ?
>
> Is there some way I can implement this add a slightly higher level, so I
> only generate commands when the drag'n drop process is finished ?
>
> /Rune
Previous Topic:Problems importing GraphVisitor
Next Topic:Refreshing all connections
Goto Forum:
  


Current Time: Thu Apr 25 05:05:21 GMT 2024

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

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

Back to the top