[Solved] Apply a default profile ? [message #872560] |
Wed, 16 May 2012 10:42 |
LE HALPER Nicolas Messages: 13 Registered: April 2012 |
Junior Member |
|
|
Hi everyone,
Is it possible to apply programmatically a default profile after the creation of a new uml model ? Indeed, overwhise, I had to apply the profile manually thanks to Papyrus interface ( Proprieties -> Profile -> Apply registered profile ).
Thanks for answers.
[Updated on: Fri, 18 May 2012 20:58] Report message to a moderator
|
|
|
|
|
Re: Apply a default profile ? [message #872664 is a reply to message #872659] |
Wed, 16 May 2012 15:06 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Nicolas,
The second solution doesn't involve any Java-code : you simply register a predefined UML Model, on which your profile is already applied. Then, this model becomes available in the "template" page of the wizard. It is simply an extension point + a UML Model, packaged into a plug-in.
For the first option, the SysML Profile application example is located in oep.sysml.diagram.common.commands.CreateSysMLModelCommand, which is called by the Wizard.
So, basically, for the first option, you have 4 main steps :
- Create a ModelCreationCommandBase (See oep.sysml.diagram.common.commands.CreateSysMLModelCommand for an example)
- Register the command through the org.eclipse.papyrus.infra.core.papyrusDiagram extension point
- Create a CreateModelWizard (See org.eclipse.papyrus.sysml.diagram.ui.NewSysMLModelWizard for an example)
- Register the wizard through the org.eclipse.ui.newWizards extension point
Camille
Camille Letavernier
|
|
|
|
Powered by
FUDForum. Page generated in 0.03092 seconds