|
|
|
Re: create an odesign file programmatically [message #1754582 is a reply to message #1754313] |
Mon, 20 February 2017 14:32 |
|
Hi Faiez,
If you open an existing Viewpoint Specification Model and select any VSM element, you will have the "Show type" action in the contextual menu. If you enabled it, it will display the EClass of each element of the VSM at the beginning of their label (see first attachement).
Then you can also use the Acceleo Interpreter view (configured as Sirius Interpreter) to do some requests in AQL to check some values or properties of the selected element.
With these info and the Sirius metamodels and their factories, you should be able to programmatically populate your VSM models as any other EMF models. Just pay attention to some attributes/references which can have different names between the VSM editor and the model definition (see properties files in metamodels plugins)
You will find metamodels and factories here:
- Core: org.eclipse.sirius/model/viewpoint.ecore
- org.eclipse.sirius.viewpoint.description.DescriptionFactory.eINSTANCE
- Diagram: org.eclipse.sirius.diagram/model/diagram.ecore
-org.eclipse.sirius.diagram.description.DescriptionFactory.eINSTANCE
- Sequence: org.eclipse.sirius.diagram.sequence/model/sequence.ecore
-org.eclipse.sirius.diagram.sequence.description.DescriptionFactory.eINSTANCE
- Table: org.eclipse.sirius.table/model/table.ecore
- org.eclipse.sirius.table.metamodel.table.description.DescriptionFactory.eINSTANCE
- Tree: org.eclipse.sirius.tree/model/tree.ecore
- org.eclipse.sirius.tree.description.DescriptionFactory.eINSTANCE
- Properties: org.eclipse.sirius.properties/model/properties.ecore
- org.eclipse.sirius.properties.PropertiesFactory.eINSTANCE
For the creation of the files, you might take a look to : org.eclipse.sirius.editor.tools.internal.wizards.ViewpointSpecificationProjectWizard.performFinish()
Regards
|
|
|
Powered by
FUDForum. Page generated in 0.02882 seconds