Bug 157507 - [IDE] [IDE] Project Copy dialog OK button enablement is wonky
Summary: [IDE] [IDE] Project Copy dialog OK button enablement is wonky
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-09-15 13:49 EDT by Mark Melvin CLA
Modified: 2008-07-14 08:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Melvin CLA 2006-09-15 13:49:38 EDT
I just filed Bug #157505 that I uncovered trying to reproduce this weird behaviour:

A user of ours found that if he did the following.  First of all, you need to sucessfully copy an existing project by doing this:

- Copy any project in your workspace with Ctrl+C
- Ctrl+V it into your workspace
- When the dialog pops up, uncheck Use default Location and type in any folder
name *not* in your existing workspace to avoid Bug #157505

After this succeeds, do the following:

- Select the new project you just copied in your workspace and copy it with Ctrl+C
- Ctrl+V it into your workspace
- Now, the Copy Dialog will pop up with the new filename ("Copy of <other project name>", and with the checkbox "Use default location" already unchecked as it remembered my decision from last time.  However, the project location happens to be the same as the existing project you are copying.  

If you clicked OK now (and it is enabled) you get an error.  Naturally this is not desired.  Also, the name of the project is not nice so I want to change the project name as well the location.  So I:

- First change the name of the project to a new name.  Now the OK button is disabled because the location overlaps an existing project (this should be the case from the get-go).
- So, now I change the folder name to a new, non-existent folder.

But the OK button is still disabled!  I need to go twiddle the project name again (add and delete a character or something) to enable the OK button.  

You can work around this if you change the folder name before the project name, but there are multiple issues here...
Comment 1 John Arthorne CLA 2006-09-15 16:31:47 EDT
I think the root of this problem, along with bug 157505 and bug 156803 is that the project copy dialog does not validate the chosen location if "use default" is unchecked.  It should be calling IWorkspace.validateProjectLocation with the contents of the location text box on each key stroke. This would prevent "Ok" from being pressed when the location is invalid.
Comment 2 Mark Melvin CLA 2008-07-11 15:38:11 EDT
FYI - I think this can be resolved.  It is no longer an issue in Eclipse 3.4.
Comment 3 Tod Creasey CLA 2008-07-14 08:20:22 EDT
Thanks Mark