We have a GEF's graphical viewer on which files can be dragged and
dropped. A draw2d figure is created for the dropped file. There is a
DropTargetListener installed on the viewer, registered against
FileTransfer.
On Windows the drag and drop works. On Linux it doesn't. The listener
receives the event and recognizes the transfer data as a FileTransfer.
However, the method FileTransfer#nativeToJava(TransferData) returns null
in Linux, because TransferData#pValue == 0, i.e. it's just not set.
The transfer data object for the event is created in
DropTarget#setEventData(...)
and there is no place where TransferData#pValue is being set. In fact, the
type of th transfer is the only field set for TransferData on Linux
Windows TransferData seems to have a similar field -
TransferData#pIDataObject, which is being set in the windows version of
DropTarget#setEventData(...).
Is SWT simply not supporting FileTransfer on Linux or some other drop
target listener needs to be installed expecting a different kind of
transfer? Perhaps, it is just a typo in the DropTarget#setEventData(...)
method?
Thanks.