drag and drop and ContainerEditPolicy ? [message #468107] |
Tue, 04 August 2009 08:01 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02988 seconds