Community
Participate
Working Groups
20020514 in the navigator, select a file, copy it delete it select its folder and paste your get a big and scary error dialog. if you try doing this with a java file you get sth like the following in the log: java.version=1.4.1-beta java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -dev bin -data D:\runtime-workspace !ENTRY org.eclipse.ui 4 0 Thu May 16 12:28:19 CEST 2002 !MESSAGE Problems creating buffer !ENTRY org.eclipse.jdt.core 4 969 Thu May 16 12:28:19 CEST 2002 !MESSAGE Sd.java does not exist.
Tried this in 0515. Got the error dialog, but it's not that big and scary. Shouldn't happen though. FWIW, MS Explorer has the same bug. We could improve our error handling and give a message dialog, rather than an error dialog, indicating that the paste could not be completed because the original file was deleted.
*** Bug 22605 has been marked as a duplicate of this bug. ***
PasteAction is now disabled if resources/files on clipbaord do not exist. In addition, CopyFilesAndFoldersOperation aborts when a workspace resource or external file does not exist. This still uses an error dialog since such a copy/import attempt does in fact present an error case. The copy/paste action should check if the file exists before calling the CopyFilesAndFoldersOperation. However, the error message presented in this case is a lot clearer.
Backed out the change in CopyFilesAndFoldersOperation.validateImportOperation that checks for non-existent external files. This check prevented the content of WinZip archives from being dragged into Eclipse. Winzip puts a name in the clipboard that points to a temporary file. The file is not actually created/extracted from the archive until the drop occurs. The CopyFilesAndFoldersOperation check failed because it tested the temporary file. We still test for non-existent files when the copy operation actually runs because by then the file really has to exist.
The current fix can adversely affect performance during startup and when the Navigator context menu is displayed. See bug 28602. Should take out file exists check in PasteAction and in CopyFilesAndFolderOperation.validateDestination. Should check all files in CopyFilesAndFolderOperation.copyFiles and copyResources and display those that are missing.
i removed the exists() check from our code i call CopyFilesAndFolderOperation.copyFiles so once this is fixed we'll be fine
Fixed CopyFilesAndFoldersOperation and PasteAction. Fixed in > 20030113.