Community
Participate
Working Groups
comments from Ankit from bug 225573: The following scenario does not work: 1. Copy a folder in RSE 2. Paste it on the PARENT of itself. This was supported in the IBM RSE and gave a conflict dialog to the user. The dialog allowed the user to rename the resource being copied. A general case of the last comment, if I copy a file/folder into a folder that already contains a resource by that name, I DO NOT get an option to rename the resource being pasted. I can only overwrite the existing resource.
Hey Dave, Support to rename on a copy collision has been removed as per enhancement in bug 210682
Changed summary, previous value was: copy/paste on parent of resource on it's parent doesn't missing rename dialog It looks like what the client is trying to achieve, is take a whole file tree and duplicate this tree in the same folder by giving it a new name. This is a use-case that we should still support, although I'm not sure if our previous solution, having a "rename" option on the "paste conflict resolution" dialog, is the right thing to do. Right now, when I "Copy" the folder and "Paste" it onto its parent, RSE simply does nothing at all; which definitely does not seem the right thing to do. When I do the same with Windows Explorer, it automatically creates a folder named "Copy of src"; and when I do it again, it creates a folder named "Copy (2) of src". I could imagine providing the same functionality as Windows Explorer here; or, restoring the ability to select a different name in the special case that a folder or file is tried to copy onto itself. Thoughts?
Since this is a regression, we should fix it for M7 (feature freeze) with highest priority.
I think having a duplicate of the source with "Copy of" + name as the source name would be a better solution than bringing back the rename for this one particular case.
I have a working solution right now, just wondering on committers thoughts of the naming convention that we should use. Currently I have Copy of file Copy of file (2) Copy of file (3) If we go by Windoze, it should be something like this: Copy of file Copy (2) of file Copy (2) of file Any suggestions/thoughts? Rupen
I like the Windows style better, but I'm afraid that the solution is problematic anyways because the text should be internationalized / translated, so it is PII and PII has been frozen yesterday. At any rate you should use a Pattern and Java MessageFormat such that the place of the number can be changed easily: String pattern = "Copy {0,choice,1<({0,number,integer})} of {1}"; //$NON-NLS-1$ String s = MessageFormat.format(pattern, new Object[] { new Integer(num), filename }); The pattern should eventually go into a Java Properties File (NLS) such that it can be translated into other languages. See the Java MessageFormat Javadoc for the pattern language markup. Xuan / DaveD, what do you think?
Thanks for suggesting the usage of MessageFormat Martin. Seems to have worked in my favor using a pattern String for this defect. I have a working solution using MessageFormat. I will post a patch as soon as bug 198728 gets committed as it deals with the same file. Rupen
Question? what happens when a folder/file is selected within the parent and outside of the parent then copied to the parent (both already existing but not the same file). What should happen if the user cancels the overwrite of the resource outside of the parent? should the "Copy of" of the resource inside the parent still be created? Rupen
Can you rephrase that? I don't understand the question. Perhaps use concrete example like a/b/c copied into a/c etc
Lets say FolderA is the child of FolderB FolderC is not related to these folders but has the same name as one of the children in FolderB FolderA and FolderC are copied to FolderB User gets a dialog saying that FolderC already exists in FolderB would you like to overwrite? If the user chooses to cancel, should "Copy of FolderA" still be created?
Oh, so you're copying multiple sources in a single copy operation. These seems a pretty rare corner case here, especially since you're mixing "same instance" with "different instance" case. Anyways, I think the following approach seems to make sense: Perform the same operation as if all the sources of your copy operation (FolderA and FolderC in this case) would be the children of some "VirtualRoot" folder and the VirtualRoot folder is copied into FolderB. In this case, you would show the "Merge" dialog saying: FolderA already exists in target FolderB already exists in target Do you want to overwrite existing resources? In other words, you warn the user about copying FolderA into FolderA in this case even though this is a trivial no-op here. What counts is giving the feedback about what's about to happen. Since user requested a combined multi-op he should see a feedback dialog for his entire multi-op.
But you might want to try out what Windows Explorer does in this case.
Created attachment 97279 [details] Copy & Paste to Parent Folder Here is the patch using MessageFormat, Please review and commit when possible. Thanks, Rupen
*** Bug 228489 has been marked as a duplicate of this bug. ***
When copy and pasting a single file, I much prefer the dialog box option of renaming the file and wish this feature wasn't removed. I often copy a file and know what I want to rename it. I would not want a new file created with a file named something I didn't name and then I would have to go back and name it the file name I want. That's tedious, and in a directory with a lot of files it wouldn't end up in the same area as the previous file. So for example, if I have a file myproject1.ser and I want to create a new file myproject2.ser, I can select myproject1.ser, copy, click on the folder and paste, get the pop up, change the file name to what I want and be done with it.
Arguably, provided that the default action for Rename/Overwrite is "Rename", AND the focus on the dialog is the field for the new name, you are right and fewer mouse clicks are required for the "old style".
We also encountered this problem (copy a file/folder to its parent just did nothing) during our IFS support. It is kind of annoying, and hope it could be fixed very soon. We still have until May 8 for NL string changes.
I agree that we need to find consensus on this topic quickly. I added it to our committer meeting agenda for tomorrow, http://wiki.eclipse.org/DSDP/TM/Committer_Phone_Meeting_30-Apr-2008 Please prepare for the discussion by making up your mind what you think is the right thing to do.
Created attachment 98263 [details] Copy & Paste to Parent Folder RESID_CONFLICT_COPY_PATTERN is the NL String that was added containing the MessageFormat pattern. Please review.
Could someone please review and commit this one for M7. Thanks, Rupen
DaveM, you filed this bug, can you review it please? Rupen: Did you manage to automatically select the renamed ("Copy of...") resources in the SystemView when the operation is complete, as we discussed in http://wiki.eclipse.org/DSDP/TM/Committer_Phone_Meeting_30-Apr-2008 ? Also note that you can use Bugzilla's "review" flag to ask for a review.
No, at this point the resources are not selected. Can I open up a separate enhancement on that please? There might be complications and I might not have time to look into it for M7. Thanks, Rupen
Sure. Please do open the new enhancement request, and link it to this one via depends/blocks.
I don't have time to look at this in any detail now. I'll try to get to it on monday.
Created attachment 98822 [details] patch updated to merge with other changes I've had to update the patch since SystemViewRemotefileAdapter changed independently of this one. The update to the patch was completely manual since the compare tooling fails in this case. Rupen, can you check the patch to ensure that I didn't change the logic from what you originally had (i.e. misplacing parenthesis or something).
Created attachment 98864 [details] Updated Patch Hey Dave, I merged the code as per conversation. Please review and commit. Thanks, Rupen
The patch works well. I've committed the changes to cvs.