Community
Participate
Working Groups
Build ID: 3.3.1.1 Steps To Reproduce: first prblem: 1.create general project "test" in workspace 2.select project and click File->Move... 3. -> ok button is greyed out 4.deselect "use default location" 5.select "use default location" 6. -> ok button is enabled ???!!! second problem: 7.deselect "use default location" again 8.choose location outside workspace (e.g. "c:\temp\") 9.hit ok 10. -> error dialog comes up reporting a problem "ressource already exists on disk c:\temp." but there is no project on c:\temp called test!
the main problem is the not working move operation - the enablement of the ok button is a secondary problem. so i change the summary to the main problem.
This is an IDE/Dialog issue.
The first problem isn't a problem - you are trying to move it back to it's current location. If you do the same steps with a project that is not at the default location it will work for you. The second part is from our call to project.move(description, IResource.FORCE | IResource.SHALLOW, monitor). Moving to resources and renaming.
I can reproduce it.
(In reply to comment #4) > I can reproduce it. CQ:WIND00084563 Hi Szymon :) Any news on this one? Thanks a lot! :) Helmut
I can reproduce this, but it is expected behaviour. You can't move a project to a location that already exists. I think there is a user misunderstanding here. If you select the location C:\temp for a project called test, the project location will be C:\temp, not C:\temp\test. I.e., the directory you enter here *IS* the location of the project. The directory name and project name do not have to match.
(In reply to comment #6) > I can reproduce this, but it is expected behavior. You can't move a project to > a location that already exists. > > I think there is a user misunderstanding here. If you select the location > C:\temp for a project called test, the project location will be C:\temp, not > C:\temp\test. I.e., the directory you enter here *IS* the location of the > project. The directory name and project name do not have to match. Hi John :) I'm not sure I understand the reasoning here: Q: Why is moving into an existing directory not allowed, all the difference is one "mkdir" in between, right? Q: If moving into an existing directory is not allowed, why isn't the dialog just plainly refusing the existing directory with a reasonable message, like "You cannot move the project "test" into the existing directory <whatever dir> because it already exists and <explain why>" Let me know what you think! :) Helmut
(In reply to comment #7) > I'm not sure I understand the reasoning here: > Q: Why is moving into an existing directory not allowed, all the difference is > one "mkdir" in between, right? If the existing directory is empty, then the move will succeed. If the existing directory contains other files, then the move would involve merging the existing files at the destination into the project. This is more than a mkdir and potentially involves a complex merge. Also, it would strike me as strange as an end-user that "moving" a project could result in it acquiring new contents as part of the process. > Q: If moving into an existing directory is not allowed, why isn't the dialog > just plainly refusing the existing directory with a reasonable message, like > "You cannot move the project "test" into the existing directory <whatever dir> > because it already exists and <explain why>" Yes I agree the UI could check this first.
One might think we could add this test to IWorkspace#validateProjectLocation. However this method is used for both project creation and project move, so it can't add this extra check. This is why the javadoc says, "This method does not consider whether files or directories exist in the file system at the specified path." I think the easiest option is to add a check in the UI to the effect of if (fileStore#childNames(EFS.NONE,null).length > 0) error("The destination directory is not empty");
(In reply to comment #9) > One might think we could add this test to IWorkspace#validateProjectLocation. > However this method is used for both project creation and project move, so it > can't add this extra check. This is why the javadoc says, "This method does not > consider whether files or directories exist in the file system at the specified > path." I think the easiest option is to add a check in the UI to the effect of > > if (fileStore#childNames(EFS.NONE,null).length > 0) > error("The destination directory is not empty"); Thanks John, this sounds like a good resolution to me: the UI will refuse an operation we know would fail. The error message could go into more details, or the associated help entry could, so that customers know we do not want to get into the merging business and thus refuse this kind of operation.. Helmut
Ping, this looks like a great bug for a bugday or hackathon ... adding a "bugday" keyword for now, do we have any other kind of markup ?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.