Bug 443777 - The name of the odesign should be initialized from the name of the project
Summary: The name of the odesign should be initialized from the name of the project
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-09-11 02:57 EDT by Jessy Mallet CLA
Modified: 2014-10-27 06:52 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jessy Mallet CLA 2014-09-11 02:57:58 EDT
When creating a new Viewpoint Specification Project with the wizard, the name of the odesign is initialized with My.odesign.

It should be initialized by exploiting the name of the project, by taking the the last word before "design" in the project name. If the user has not suffixed his project with "design", the last word sould be taken.
Comment 1 Jessy Mallet CLA 2014-09-12 11:47:07 EDT
See the proposed gerrit solution :
https://git.eclipse.org/r/#/c/33327/
Comment 2 Florian Barbin CLA 2014-09-15 08:26:37 EDT
Gerrit review merged.
Comment 3 Pierre-Charles David CLA 2014-09-16 04:26:40 EDT
Using the wizard with the default values untouched produces a VSM file named "project.odesign.odesign".
Comment 4 Jessy Mallet CLA 2014-09-16 04:42:20 EDT
See the proposed gerrit solution :
https://git.eclipse.org/r/#/c/33426/
Comment 5 Pierre-Charles David CLA 2014-09-16 08:35:29 EDT
Another issue:
1. Open the wizard (New > Viewpoint Specification Project)
2. Enter a non-default project name whose next-to-last segment is not "project", e.g. "com.example.design".
3. Click finish immediatly, without ever going to the second page.

The project is created with a VSM named "project.odesign". The whole logic is completely skipped if the second page is not traversed.
Comment 6 Pierre-Charles David CLA 2014-09-17 09:39:03 EDT
Fixed by c2266fd5f0be8b2f741304c4f5b3f027e4b0e6da.
Comment 7 Pierre-Charles David CLA 2014-09-17 09:52:59 EDT
Actually, there is still another issue:
1. Open the wizard.
2. On the first page, keep the default my.project.design.
3. Hit "Next", the default VSM name is project.odesign (correct). Change it to "modeler.odesign".
4. Go back to the first page and change the project name into "com.example.design".

If you hit Finish immediatly, the VSM will be created as modeler.odesign (correct). If after step 4 if switch once again to page 2 before hitting Finish, the VSM name is changed to the name computed from the new project name.

The name computed from the project id should be a default, but as soon as the user has decided to enter a different name explictly, it should not be changed. At least that is my expectation, but it is debatable.
Comment 8 Jessy Mallet CLA 2014-09-18 09:38:07 EDT
Last comment is relevent. So as soon as the user has decided to enter a different name explictly, the VSM name do not change. 
See the proposed gerrit solution for this modification:
https://git.eclipse.org/r/#/c/33553/
Comment 9 Pierre-Charles David CLA 2014-09-24 05:11:17 EDT
Fixed by 55dde78253351d6d8ada8708d6ab9d73d2b7e1f7.
Comment 10 Pierre-Charles David CLA 2014-10-27 06:52:28 EDT
Available in Sirius 2.0.0.