| Summary: | Dragging a folder into package explorer defaults to overwrite existing folder | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Randy Hudson <hudsonr> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, markus.kell.r, Mike_Wilson, susan, sxenos |
| Version: | 3.0 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Randy Hudson
Unfortunatly, we cannot solve this without help from platform/core (see bug 31883). *** This bug has been marked as a duplicate of 37954 *** I don't see this as a dupe. If I select "No" from the dialog, the folder is merged. So I don't see and missing capabilities in core. The merging of two folders occurs normally. The problem is in the message, choices, and the default button. Randy, could you please be more specific?
- What is the relevant structure of the source and target of the operation?
- from where to where (View / OS file explorer) do you drag?
- is to operation a "move" or a "copy"?
The Packages view does not show projects nor folders. Are you talking about the
Package Explorer, or you are moving (copying?) packages?
I could reproduce this scenario which also fails in Resource Navigator:
zzz (Java Project)
+ src (source folder)
+ a (package)
+ A.java
Somewhere else in the file system, have:
...
+ a (folder)
+ file.txt
Now drag-and-drop the folder '.../a' from an OS file explorer onto the source
folder 'src'. A dialog asks: "zzz/src/a exists. Do you want to overwrite?" with
options "Yes", "Yes to All", "No", "Cancel".
Clicking "No" yields the behavior from comment 2.
Clicking "Yes" yields an NPE and no copying taking place:
Error Sep 14, 2004 11:41:41.313 Exception in
org.eclipse.ui.actions.CopyFilesAndFoldersOperation.performCopy():
java.lang.NullPointerException
Moving to Platform/UI, since the bugs are in CopyFilesAndFoldersOperation (also
when dropping to the Package Explorer, since we delegate to
CopyFilesAndFoldersOperation in this situation).
I was dragging from File Explorer to the Packages view. I was dragging an HTML file plus a directory called "images" with several GIF files in it. I was prompted to replace the existing "images" folder and selected "NO", upon which the two folders were merged. Merging should be the default behavior. And the user should be prompted whether that want to overwrite individual *files*, not the whole holder. this would be more consistent with the platform's file management. I agree with Randy on the last point: clicking "No" should not have merged the files as the message does not clearly state that is what will happen and clicking Yes means overwrite AND merge files. You sort of assume that no is the opposite of yes in this case. Markus what build to you get the NPE on? I can not recreate this on this mornings UI code from HEAD running on the 3.0.1 build from 0908. found a different bug while testing where you can not create both a file and folder of the same name from the navigator or package explorer, however this is not a problem. see bug 73894 According to the message, YES means replace the entire folder, not overwrite individual files. So perhaps only the message needs to be corrected. Compare this to the message displayed in File Explorer. Michael: I can reproduce the NPE on a fresh install of 3.1-I200409140800. On 3.0.1-M200409081421, there's no NPE, but the folders are merged regardless whether I press "Yes" or "No". "Cancel" cancels in all cases. Randy: I cannot drop anything from outside eclipse onto the Packages view (which is one of the Java Browsing views). If I read "Package Explorer" where you write "Packages", then I can confirm your observations. Yes, Package Explorer. I don't think anyone uses the PAckages View ;-) thanks Markus , please log a separate bug for your NPE > please log a separate bug for your NPE Done: bug 73962. Note that on the Mac, the *platform* behavior is to always replace the old directory with the new one. That is, it does not merge them. oops...this bug refers to the Package Explorer behavior (not navigator or project explorer). Moving to JDT-UI. This is still an issues but now the dialog is different: it asks to skip the folder. Same behavior in Project Explorer but Navigator works as expected. >This is still an issues but now the dialog is different: it asks to skip the >folder. Improving the 'Skip' by actually supporting merge is covered by bug 37954. |