Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Enable drop before/after item in viewer
Enable drop before/after item in viewer [message #430682] Wed, 03 June 2009 09:36 Go to next message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 19
Registered: July 2009
Junior Member
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 10:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:CDO v.1 vs. CDO v.2
Next Topic:Teneo: EDataType annotations
Goto Forum:
  


Current Time: Fri Apr 19 04:31:33 GMT 2024

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

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

Back to the top