Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368987

Summary: Project Name should not be reset when selecting existing code path
Product: [Tools] CDT Reporter: Jonathan Watt <jwatt>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED FIXED QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: cdtdoug, john.cortell
Version: 8.1.0Flags: angvoz.dev: review+
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 326105    

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