[Solved] Apply a default profile ? [message #872560] |
Wed, 16 May 2012 06:42  |
Eclipse User |
|
|
|
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 16:58] by Moderator
|
|
|
|
|
Re: Apply a default profile ? [message #872664 is a reply to message #872659] |
Wed, 16 May 2012 11:06   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03618 seconds