Permalink
Browse files

Fix SYSML-13 Set default name to SysML model

When a SysML project is created with the SysML project creation
wizard, the model name will be set automatically to the project
name.
  • Loading branch information...
1 parent a042ffb commit 6e2375e6fac51d29124c094e64c509fa465225f6 @mbats committed Jun 15, 2012
@@ -196,12 +196,15 @@ protected void doExecute() {
private EObject createInitialModel() {
EClassifier found = UMLPackage.eINSTANCE.getEClassifier(modelPage
.getInitialObjectName());
+ EObject model;
if (found instanceof EClass) {
- return UMLFactory.eINSTANCE.create((EClass) found);
+ model = UMLFactory.eINSTANCE.create((EClass) found);
} else {
- Model model = UMLFactory.eINSTANCE.createModel();
- return model;
+ model = UMLFactory.eINSTANCE.createModel();
}
+ if (model instanceof Model)
+ ((Model) model).setName(newProjectPage.getProjectName());
+ return model;
}
}

0 comments on commit 6e2375e

Please sign in to comment.