Community
Participate
Working Groups
Currently, Papyrus itself only has a rudimentary way to provide example models. The class ModelCopyWizard (developed originally in the context of Papyrus SW designer) registers a separate new-wizard for each example. This does not scale well with several examples with several categories. This is currently already the case with Papyrus designer, and it is expected that other components (uml-rt, Moka, ucm) will also register examples in the future. Therefore, it would be good to provide an improved example selection mechanism, in which examples can be grouped according to a category.
@Jeremie: I've put you on copy to see whether you have specific requirements for an example model wizard (from a Moka viewpoint). I already have a patch and will provide sample screenshots.
Created attachment 265193 [details] Example wizard page Wizard page (step 1 = top-left, step 2 = top-right, step 3 = bottom)
@Florian: I've put you on copy, since it seems that there is some ongoing work in oxygen on a new model wizard (not sure whether that reduces the need for a specific example model wizard).
@Ansgar: Did you checked Information Modeling example? It provides model example without adding new code, reuse eclipse and emf-example (from what I remember)
(In reply to Benoit Maggi from comment #4) > @Ansgar: Did you checked Information Modeling example? > It provides model example without adding new code, reuse eclipse and > emf-example > (from what I remember) I just did - thanks for the hint. The information modeling uses an EMF mechanism I was not aware of: There is a generic class called org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard and an associated extension point "org.eclipse.emf.common.ui.examples" that probably does what I want for designer. I'll check out and will post here.
(In reply to Ansgar Radermacher from comment #5) > I just did - thanks for the hint. The information modeling uses an EMF > mechanism I was not aware of: There is a generic class called > org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard and an associated > extension point "org.eclipse.emf.common.ui.examples" that probably does what > I want for designer. I'll check out and will post here. After some tests (and a look at its source code), the class ExampleInstallerWizard does not support multiple examples. The wizard evaluates only the first extension with a matching ID, i.e. you have to define several (top-level) wizards if you want multiple models which pollutes the list of top-level examples. It is possible to define multiple projects within a single extension point, but this is not very useful, as the wizard will always copy all of the declared projects. Thus, I propose to use the EMF extension point for Papyrus examples, but sub-class the wizard.
New Gerrit change created: https://git.eclipse.org/r/85382
Gerrit change https://git.eclipse.org/r/85382 was merged to [master]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=69cb6aeb25be22410c86db7c3f29d0e66f77e5a0
New Gerrit change created: https://git.eclipse.org/r/87942