Community
Participate
Working Groups
Build: I2006114 1) Create a new project whose location is outside the workspace (say c:\temp\p1). 2) Select the project in the Navigator, and Hit Ctrl+C, Ctrl+V. 3) The project copy dialog opens. Accept the default and hit Ok. -> An error occurs because the location overlaps the location of the project being copied. There are two problems here: a) If the project is not in the default location, it should populate the dialog with a new location that is different from the original location (such as c:\temp\Copy of P1). I.e., it should provide reasonable defaults that don't cause the copy to fail. b) The location provided in the dialog should be validated using IWorkspace#validateProjectLocation. The Ok button should be greyed out until a valid location is supplied.
CCing Susan: in case this is code you are still working in.
I'm not working in here now, but I'll check against M2 behavior and see if this is a regression I caused.
Verified this bug occurs in M2 and in 3.2.1. The default location proposal is not valid, yet there is no initial validation performed. (For example, backspace and retype the last character of the project name, and now the location is validated). The default location is chosen in ProjectContentsLocationArea using the existing project's location name. So it will always be wrong when using it for a project copy. I'll leave this up to the current owner to sort out...
Not a Vista specific problem
Created attachment 59971 [details] Patch attachement Nobody was assigned to this bug, so I tried to create a patch. I hope that I understood well, what the problem was about. Please verify my work.
Thanks for the patch!
Jakub this patch does not update the path. I think the problem here is that the new location is the old location by default when it should be based on the new name. For instance if I copy a project Foo in c:\foo I will get a name Copy of Foo but the default directory will still be c:\foo not c:\copy of foo. I think a better solution would be to always use the default location in the copy dialog as there is no good way to guess another one.
Created attachment 88094 [details] Patch for I20071213-1700 Actually this problem has a very simple solution. Use a different constructor in calling the ProjectContentsLocationArea that does not pass the existing project. For a copy, the location of the existing project is irrelevant. We always want to have the default location suggested, and have the default location in the file system. I tested this patch copying both projects that have a default location and ones that don't and it works fine. Also, I think this bug 32670 is a dup of this one.
Tod, can you have a look my recent patch?; I think it's pretty straightforward and would be nice to get in.
Patch released for build >20080214
Verified in I20080323-2000
*** Bug 32670 has been marked as a duplicate of this bug. ***