Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368987 - Project Name should not be reset when selecting existing code path
Summary: Project Name should not be reset when selecting existing code path
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.1.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 326105
  Show dependency tree
 
Reported: 2012-01-18 11:18 EST by Jonathan Watt CLA
Modified: 2012-02-29 13:25 EST (History)
2 users (show)

See Also:
angvoz.dev: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Watt CLA 2012-01-18 11:18:36 EST
When doing:

  File > New > Makefile Project with Existing Code

The first field in the "Import Existing Code" window that opens is "Project Name". If you enter a name, then move on to the next field "Existing Code Location" and use the "Browse" button to select a directory, the "Project Name" field that you filled out earlier is reset to the name of the directory that you selected. This is really annoying, since it's easy to not notice this has happened until after you've created the project.

It seems like whatever code sets the "Project Name" field when a directory is selected should only do that if the "Project Name" field has been left blank by the user.
Comment 1 John Cortell CLA 2012-02-14 15:26:35 EST
I agree. I noticed this a few months ago when I tried this feature for the first time. I made a mental note to look into it but have not gotten around to it. Since someone else has complained, I'll jump on it.
Comment 2 Andrew Gvozdev CLA 2012-02-14 15:55:27 EST
(In reply to comment #1)
> Since someone else has complained, I'll jump on it.
If you up to it I suggest to take a quick jump over bug 326105 and subtasks.
Comment 3 John Cortell CLA 2012-02-15 11:52:26 EST
Fixed. Andrew, please review
Comment 4 John Cortell CLA 2012-02-15 12:01:50 EST
BTW, sorry I forgot to create a diff file and attach it. Not sure how to do it now that I've committed the change. You can just use git to inspect the commit on master.

(In reply to comment #3)
> Fixed. Andrew, please review
Comment 5 John Cortell CLA 2012-02-15 16:54:33 EST
I reworked the fix when I fixed bug 326106. The behavior is now as follows: If the  project name field contains user-entered or user-modified text, we leave the field alone. If he has never entered text, or has cleared the field, we update the project name when he enters a valid location. Patch attached to 326106
Comment 6 CDT Genie CLA 2012-02-29 13:25:36 EST
*** cdt git genie on behalf of John Cortell ***

    Bug 368987 - Project Name should not be reset when selecting existing code path

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=12f2b8f8d57806cbbfbfdcc496e1931fa433a97e
Comment 7 CDT Genie CLA 2012-02-29 13:25:36 EST
*** cdt git genie on behalf of John Cortell ***

    Bug 368987 - Project Name should not be reset when selecting existing code path

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=12f2b8f8d57806cbbfbfdcc496e1931fa433a97e
*** cdt git genie on behalf of John Cortell ***

    Bug 368987 - Project Name should not be reset when selecting existing code path

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=12f2b8f8d57806cbbfbfdcc496e1931fa433a97e