Skip to main content



      Home
Home » Modeling » EMF » Enable drop before/after item in viewer
Enable drop before/after item in viewer [message #430682] Wed, 03 June 2009 05:36 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:CDO v.1 vs. CDO v.2
Next Topic:Teneo: EDataType annotations
Goto Forum:
  


Current Time: Sat Jul 12 15:30:24 EDT 2025

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

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

Back to the top