Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up examples repository on github and add examples to OSATE #1016

lwrage opened this issue Jan 17, 2018 · 1 comment · Fixed by #2233

Clean up examples repository on github and add examples to OSATE #1016

lwrage opened this issue Jan 17, 2018 · 1 comment · Fixed by #2233


Copy link

lwrage commented Jan 17, 2018

There are various models that should probably be removed.

@lwrage lwrage added the backlog label Jan 18, 2018
@lwrage lwrage removed the backlog label Jul 9, 2019
@lwrage lwrage changed the title Clean up examples repository on github Clean up examples repository on github and add examples to OSATE Mar 5, 2020
Copy link

jjhugues commented Mar 10, 2020

Here is a proposed design for addressing this issue

  • create a examples directory in OSATE repository
  • create a plugin org.osate.examples that stores all examples as static resources in directory org.osate.examples
  • put all examples in examples subdirectory of org.osate.examples by copying the whole OSATE project.

This plugin will leverage existing Eclipse extension points to advertise examples, here is a snippet of plugin.xml to illustrate this

   <extension point="org.eclipse.ui.newWizards">     
        name="OSATE Examples"
    <wizard category="org.eclipse.ui.Examples/org.osate.examples.category"
            name="EMV2 Examples"
      <description>A collection of EMV2 examples</description>
  <extension point="org.eclipse.emf.common.ui.examples">
  	<example wizardID="org.osate.examples.EMV2Examples">
      <projectDescriptor name="ARP4761"
                         description="ARP4761 example"/>
      <projectDescriptor name="Stepper motor"
                         description="Stepper Motor example"/>

From the UI, the user may simply go to File->New->Examples then select EMV2 examples. This will import directly the projects ARP4761 and StepperMotor in the user workspace.

As opposed to the previous approach, we directly import projects instead of selecting files or directories. The benefit is that it is a no code approach. We can define as many "project wizard" as required to bundle them as chapters, e.g "EMV2 examples", "FACE examples", etc.

Note that this is the approach used by Sirius, see

It has been tested and works well.

A more sophisticated variant used by EMF is the following

I am not convinced we need this level of sophistication, as it duplicates effort and scatters examples outside of an eclipse plugin. This would makes the testing more complex (see #418)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

2 participants