Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Is Copy operation supported in Drag And Drop ?
Is Copy operation supported in Drag And Drop ? [message #1339454] Wed, 07 May 2014 17:40 Go to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
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 Go to previous message
Tim Buschtoens is currently offline Tim BuschtoensFriend
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/
Previous Topic:Java Exception when using RAP Google Maps Widget
Next Topic:[ANN] RAP 2.3M3 is here
Goto Forum:
  


Current Time: Fri Apr 26 08:24:39 GMT 2024

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

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

Back to the top