Bug 497641

Summary: Viewpoint Specification Project creation wizard does not check project name on wizard start
Product: [Modeling] Sirius Reporter: Dennis Hendriks <dh_tue>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: maxime.porhel
Version: unspecifiedKeywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Dennis Hendriks CLA 2016-07-11 03:34:00 EDT
- Create Viewpoint Specification Project using the wizard.
 - Use default name "my.project.design".
 - Create the project (Finish).
 - Create another Viewpoint Specification Project.
 - Can't click 'Next' as the default project name is already in use.
 - But the error message is not shown.
 - Change the name of the project by adding a '2' and removing the '2' again.
 - Observe how the error message "A project with that name already exists in the workspace." now does show up.
Comment 1 Maxime Porhel CLA 2016-07-11 06:10:22 EDT
Hi Dennis, 

Thanks for your detailed bug report.
We have reproduced this issue and we consider it as valid.
Nevertheless, we have currently not planned to work on it in the following releases.

The problem occurs because when the validation of the default location is done, the page is ot the current page yet, and  org.eclipse.jface.wizard.WizardPage.setErrorMessage(String) checks this before updating the container error. Then during createControle the error message is set to null. 

See NewModelingProjectCreationWizardPage(WizardNewProjectCreationPage).createControl(Composite) line: 131

Overriding the createControl methods to update the error message might solves the issue, but we have to deeper analyze this, it seems that it might occurs with other wizard using subclasses of WizardNewProjectCreationPage.