Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326105 - MakeFile Project with Existing Code wizard got issues
Summary: MakeFile Project with Existing Code wizard got issues
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on: 358388 368987
Blocks:
  Show dependency tree
 
Reported: 2010-09-23 17:21 EDT by Andrew Gvozdev CLA
Modified: 2012-03-09 07:53 EST (History)
4 users (show)

See Also:
john.cortell: review? (angvoz.dev)


Attachments
fix (9.39 KB, patch)
2012-02-15 16:47 EST, John Cortell CLA
john.cortell: iplog-
Details | Diff
Additional patch (7.66 KB, patch)
2012-02-16 16:37 EST, John Cortell CLA
john.cortell: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2010-09-23 17:21:56 EDT
New Project wizard "MakeFile Project with Existing Code wizard" is very useful but there are several usability issues with it:

- When the wizard is open it greets the user with an error message "Not a valid directory". By UI guidelines wizards should give user a chance to enter some meaningful data first.
- When user starts typing project name the error message disappears even if no directory is being changed.
- When user clears Project Name there is an NPE logged:

java.lang.IllegalArgumentException: Path for project must have only one segment.
	at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
	at org.eclipse.core.internal.resources.WorkspaceRoot.getProject(WorkspaceRoot.java:183)
	at org.eclipse.cdt.managedbuilder.ui.wizards.NewMakeProjFromExistingPage.validateProjectName(NewMakeProjFromExistingPage.java:96)
	at org.eclipse.cdt.managedbuilder.ui.wizards.NewMakeProjFromExistingPage$1.modifyText(NewMakeProjFromExistingPage.java:89)

- When user entered project name and proceeds to type location starting from "/", the name disappears accompanied with already familiar exception.
- "Finish" button is enabled all the time even if error message indicates impossibility to create a project.

- The title of the wizard should say "New project" rather than "Import" which is a different concept.
- The wizard should use "New C++ Project" icon (with overlay indicating creation of new project).
- It would be nice to have a border around toolchain list consistent with the style of C/C++ New Project Wizard.
Comment 1 Martin Oberhuber CLA 2011-08-03 09:00:37 EDT
Found exactly the same issues in the CDT 8.0 Indigo release.

The wizard is still usable, but I found the IllegalArgumentException being logged pretty disturbing.
Comment 2 John Cortell CLA 2012-02-14 16:00:08 EST
I'll address this in addition to bug 368987
Comment 3 John Cortell CLA 2012-02-15 16:47:50 EST
Created attachment 211073 [details]
fix

This fixes the issues reported in this bugzilla and the one in 368987. Also fixed some other issues I noticed, e.g., inadequate validation of project name (entering  a string with a '*' should generate an error).
Comment 4 John Cortell CLA 2012-02-15 16:48:37 EST
Fixed. Andrew, please review
Comment 5 Andrew Gvozdev CLA 2012-02-16 11:09:37 EST
I can see that the reported issues got fixed, including subtask bug 330748. Much better. Here are my observations while testing after the fix:
- after using [Browse] button "Finish" is kept disabled until the user types trailing slash to which there is no any hint. Can you fix it not to require the slash?
- the borders are added and look nice but, well, still inconsistent with the style of regular C/C++ New Project Wizard. This is minor though, I am OK to keep this way.
- there are some more "refinements" suggested in sub-bug 358338, did you see that one?
Comment 6 Andrew Gvozdev CLA 2012-02-16 11:11:42 EST
(In reply to comment #5)
> - there are some more "refinements" suggested in sub-bug 358338, did you see
> that one?
Sorry, sub-bug 358388.
Comment 7 John Cortell CLA 2012-02-16 11:13:21 EST
(In reply to comment #5)
> I can see that the reported issues got fixed, including subtask bug 330748.
> Much better. Here are my observations while testing after the fix:
> - after using [Browse] button "Finish" is kept disabled until the user types
> trailing slash to which there is no any hint. Can you fix it not to require the
> slash?
> - the borders are added and look nice but, well, still inconsistent with the
> style of regular C/C++ New Project Wizard. This is minor though, I am OK to
> keep this way.
> - there are some more "refinements" suggested in sub-bug 358338, did you see
> that one?

Thanks for the review and feedback. I'll address these things today
Comment 8 John Cortell CLA 2012-02-16 16:37:11 EST
Created attachment 211142 [details]
Additional patch

Additional patch that address Finish button enablement when user chooses file by browsing to it. Also addressed 358388, using some of the code from its contributed patch
Comment 9 John Cortell CLA 2012-02-16 16:40:36 EST
(In reply to comment #5)
> - the borders are added and look nice but, well, still inconsistent with the
> style of regular C/C++ New Project Wizard. This is minor though, I am OK to
> keep this way.

The reason they look different is that a Tree is used in the C/C++ New Project Wizard, while a List is used here. The Tree is overkill for the toolchain selector, as the choices are a flat collection. However, it's used in that other wizard because its neighboring control is a tree; i.e., for consistency. That does not apply in this wizard so I've kept it to a List.
Comment 10 CDT Genie CLA 2012-02-29 13:25:38 EST
*** cdt git genie on behalf of John Cortell ***

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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

    Bug 326105 - MakeFile Project with Existing Code wizard got issues

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