Is Copy operation supported in Drag And Drop ? [message #1339454] |
Wed, 07 May 2014 17:40 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
Hello,
I cannot manage to have Drag and Drop with operation DND.DND_COPY working in RAP.
operation DND.DND_MOVE is working fine but if I do something like this:
getTreeViewer().addDragSupport(DND.DROP_COPY, transferTypes, new MyDragListener());
getAnotherViewer.addDropSupport(DND.DROP_COPY | DROP_MOVE, transfertTypes, new MyDropListener());
I cannot drag and drop something because the event is always DND.DROP_NONE
by debugging I see that in org.eclipse.swt.internal.widgets.displaykit.DNDSupport.readOperationParam(NotifyOperation)
value is always "none" unless I set DND.DROP_MOVE instead of DND.DROP_COPY in getTreeViewer().addDragSupport (in this case it is "move")
is it possible to use other operation like link and copy in RAP or move is the only operation suppored ?
By the way, I cannot use this forum anymore with chromium (login fails), i need to use firefox.
Best regards.
Arnaud
[Updated on: Wed, 07 May 2014 17:41] Report message to a moderator
|
|
|
Re: Drag And Drop Behavior [message #1340959 is a reply to message #1339454] |
Thu, 08 May 2014 08:51 |
Tim Buschtoens Messages: 396 Registered: July 2009 |
Senior Member |
|
|
Hi.
You have to either press CTRL to switch to COPY, or set the detail field
of the DropTarget event.
Greetings,
Tim
Am 07.05.2014 19:40, schrieb Arnaud MERGEY:
> Hello,
>
> I cannot manage to have Drag and Drop with operation DND.DND_COPY
> working in RAP.
>
> operation DND.DND_MOVE is working fine but if I do something like this:
>
> getTreeViewer().addDragSupport(DND.DROP_COPY, transferTypes, new
> MyDragListener());
>
> getAnotherViewer.addDropSupport(DND.DROP_COPY | DROP_MOVE,
> transfertTypes, new MyDropListener());
>
> I cannot drag and drop something because the event is always DND.DROP_NONE
> by debugging I see that in
> org.eclipse.swt.internal.widgets.displaykit.DNDSupport.readOperationParam(NotifyOperation)
>
>
> value is always "none" unless I set DND.DROP_MOVE instead of
> DND.DROP_COPY in getTreeViewer().addDragSupport (in this case it is "move")
>
> is it possible to use other operation like link and copy in RAP or move
> is the only operation suppored ?
>
> By the way, I cannot use this forum anymore with chromium (login fails),
> i need to use firefox.
>
> Best regards.
> Arnaud
--
Tim Buschtöns
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Powered by
FUDForum. Page generated in 0.03057 seconds