Community
Participate
Working Groups
with drop S-2.0RC3-200706140914: - drag a file from the project explorer into a directory of a ssh connection => I can see visual feedback (a file icon), but nothing happenss. The visual feedback stays there when I release the mouse until I click into Remote Systems View again. However, dragging from the remote system to the project explorer works. Also dragging a file from one remote directory to another works as well...
This may be a known limitation due to the way the project explorer works. Assigning to DaveM for evaluation.
how else would I get a file to a remote ssh site?
What happens if you use the Navigator?
With the navigator, it works just fine! What's actually the difference between the two?
The project explorer is used by other plugins like CDT, therefore I think it's critical to support it.... I haven't used the navigator since quite some time... one of the problems is that is does not allow to group into working sets. I'm lost without that grouping -- too many projects in my workspace...
Actually, dropping from project explorer should work. Copy/paste from project explorer to RSE seems fine to me but there seems to be a bug in the RSE drop adapter. The known limitation is in dragging and dropping from RSE to project explorer.
Created attachment 71473 [details] experimental hack for dnd from project explorer Here's an experimental hack that gets resources from project explorer via drag and drop. This isn't the right way to do it - I think we need to use common resources adapters but that requires a bit of investigation.
Workaround: I guess the safest is to drag&drop or copy&paste from the RSE "Local Files" subsystem to the remote. I agree the the Project Explorer should be fixed. It's different than Resource Navigator, because PE can show any kind of contents whereas RN always shows only files -- so RN always uses FileTransfer whereas PE uses something different.
Martin, did you try the patch I put here? It may be a suitable workaround for the time-being.
I did not look into what you described as a hack - IMHO we have time until 2.0.1 so we should come up with a proper solution.
Reproduced this with RSE HEAD on both Windows and Linux. Got following NPE when dragging a folder from a project in project explorer into a folder below "Local Files"/My Home/aatmp. Changed summary, old value was: Dropping a file from the ProjectExplorer into a sftp directory does not work The problem seems to be that RSE detects a PluginTransfer, tries to unmarshal it and thinks it was an RSE object being dragged. But the string unmarshaled is just "org.eclipse.ui.navigator" which does not map to a valid profile / connection, hence the NPE when trying to access the profile. Attached patch fixes the issue, so I'm applying it into RSE HEAD for now. The NPE is as follows: java.lang.NullPointerException at org.eclipse.rse.ui.internal.model.SystemRegistry.getHostPool(SystemRegistry.java:1343) at org.eclipse.rse.ui.internal.model.SystemRegistry.getHost(SystemRegistry.java:1530) at org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter.getObjectFor(SystemViewDataDropAdapter.java:260) at org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter.getRSESourceObjects(SystemViewDataDropAdapter.java:112) at org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter.getSourceObjects(SystemViewDataDropAdapter.java:127) at org.eclipse.rse.internal.ui.view.SystemViewDataDropAdapter.performDrop(SystemViewDataDropAdapter.java:164) at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:233) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
Patch applied: [192704] work around drag&drop issues from Project Explorer SystemViewDragDropAdapter.java 1.4 Filed bug #200557 asking for review of the experimental hack to come up with a proper solution
The fix is good for normal files (*.txt, ...) or simple projects. It fails for *.c / *.h files in CDT projects. In that case, the file is simply not transferred, no error message is logged. Getting this to work is very import for our product! To reproduce: * Install CDT 4.0 (Help > Software Updates > Find and Install > New Features > Europa Discovery Site > C/C++) * File > New > C Project * Accept the Defaults * File > New > Source Folder, name="src" * File > New > C File, name="foo.c" * Drag & Drop foo.c from project explorer into RSE System View, Local Files/My Home/aatmp The file is not transferred.
Since the original NPE is no longer seen, this bug is marked fixed. The CDT issue is tracked by bug 200682.