DnD - FileTransfer - Resource not Found [message #328647] |
Thu, 29 May 2008 20:43 |
Eclipse User |
|
|
|
Originally posted by: marcio.debarros.gmail.com
Hi,
I am trying to implement Drag and Drop between two views, the source
view only allows Drag and is an extension the CNF.
The target view only allows drop and is TreeViewer view.
I am able to drag the object (a file) from the source view and drop on
the appropriate receiver object in the target view. Note that I don't
want to loose the original file, just create a copy of it to send to the
drop target.
While debugging I go as far as seeing the full path of the dragged file,
but once I try to read its contents I get a ResourceException, saying
that the file does not exist.
If I look on the source view, and on the file system, the file is still
there.
Here is how I set the drop support on my view:
int operations = DND.DROP_COPY;
Transfer[] types = new Transfer[] {FileTransfer.getInstance()};
dropAdapter = new MessageTreeDropAdapter(brokerViewer);
brokerViewer.addDropSupport(operations, types, dropAdapter);
I tried before operations = DND.DROP_COPY | DND.DROP_MOVE and still the
same result.
Any suggestions or ideas on what I may be doing wrong ?
Thanks,
--MD.
|
|
|
Powered by
FUDForum. Page generated in 0.02376 seconds