Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: Please note that this issue is reproducible only in RHEL 5.0. 1) Create a table viewer 2) Set the content provider and label provider for the viewer 3) Implement a class "MyDropAdapter" which extends "org.eclipse.jface.viewers.ViewerDropAdapter" 4) Implement the method "public boolean performDrop(Object data)" in "MyDropAdapter" 5) Set "MyDropAdapter" as the drop target listener in the viewer created in step 1. 6) Mount a shared network drive in RHEL 5.0 7) Drag and drop a file from the mounted drive in to the viewer. Bug : In performDrop(Object data) method of "MyDropAdapter", data is coming as NULL. Following code can be used to reproduce the problem. Please use appropriate content provider, label provider, sorter and input. TableViewer viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(....); viewer.setLabelProvider(....); viewer.setSorter(...); viewer.setInput(...); MyDropAdapter dropAdapter = new MyDropAdapter(viewer); int ops = DND.DROP_COPY | DND.DROP_MOVE; Transfer[] transfers = new Transfer[] {FileTransfer.getInstance()}; viewer.addDropSupport(ops, transfers, dropAdapter); class MyDropAdapter extends ViewerDropAdapter { protected MyDropAdapter(Viewer viewer) { super(viewer); } public boolean performDrop(Object data) { System.out.println("data="+data); return true; } public boolean validateDrop(Object target, int operation, TransferData transferType) { return true; } } More information:
Janash, is this an NFS mount? Also, what happens if you drag a file onto the Package and/or the Project Explorer?
Yes. This is an NFS mount. I tried to drag and drop a file from a mounted drive (mounted NFS drive) into Eclipse Project Explorer. The file was not added.
Paul, have you seen this behavior? (Note that it doesn't work even in the Project Explorer.)
(In reply to comment #3) > Paul, have you seen this behavior? (Note that it doesn't work even in the > Project Explorer.) I can drag a file from an NFS mount from Nautilus 2.16.2 into the eclipse Project Explorer or Package Explorer (to either the project or folder level). My system is RHEL based: Red Hat Enterprise Linux Client release 5.3 (Tikanga) gtk2-2.10.4-20.el5 If you drag the file in the Project Explorer, do we log an exception in <workspace>/.metadata/.log PW
Paul, do you think I should pass this on to Francis for a look?
What's the status of this bug? (It is marked as "critical" - is that accurate?)
I'm not sure, Paul ?
Please re-open if this is still a problem. PW