Enable drop before/after item in viewer [message #430682] |
Wed, 03 June 2009 05:36  |
Eclipse User |
|
|
|
Ed
Following your previous advice I am successfully appending an item when I
drop an external file onto a parent item by implementing a
DragAndDropCommand.
Where the item dragged is internal i.e. an item from another viewer, and
when the item is dragged over a sibling, the viewer shows the insert line
before or after, and the subsequent drop is in the appropriate place
However when the item is external, e.g. a file name, that function is not
enabled.
What do I need to do to enable this function? I have a feeling that it
involves specialising ViewerDragAdapter.
Thanks again.
Robert
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
Re: Enable drop before/after item in viewer [message #430683 is a reply to message #430682] |
Wed, 03 June 2009 06:44  |
Eclipse User |
|
|
|
Robert,
Various methods in DragAndDropCommand are called like prepareDropInsert
and prepareDropCopyInsert which create other commands, like AddCommands,
and ultimately those commands need to be enabled for an insert to work
properly. So you'll need to step through this logic or monitor closely
the commands that are being requested to ensure that executable ones are
being returned for the cases you want to support.
Robert Onslow wrote:
>
> Ed
> Following your previous advice I am successfully appending an item
> when I drop an external file onto a parent item by implementing a
> DragAndDropCommand.
>
> Where the item dragged is internal i.e. an item from another viewer,
> and when the item is dragged over a sibling, the viewer shows the
> insert line before or after, and the subsequent drop is in the
> appropriate place
>
> However when the item is external, e.g. a file name, that function is
> not enabled.
>
> What do I need to do to enable this function? I have a feeling that it
> involves specialising ViewerDragAdapter.
>
> Thanks again.
>
> Robert
>
|
|
|
Powered by
FUDForum. Page generated in 0.04169 seconds