Eclipse 4 Application Platform Tutorial App on Github
For my Eclipse 4 Application Platform trainings/tutorial I use a small but complete application for the tutorial labs. The application includes:
- Eclipse 4 Application Model
- Domain Model as OSGi Declarative Service (to be used with DI container)
- Eclipse 4 Application Model extension:
- Providing a model fragment in a separate bundle (Details View)
- Extending the e4 ui application model with a new model element (TutorialPartStack)
- Headless build with Tycho
- A bit CSS styling
- A styled Login dialog using Lifecycle-Hooks
- much more
You find all the projects at https://github.com/toedter/e4-tutorial.
The Tycho Build
To run the Tycho build locally, just:
- Have Maven 3 installed
- Clone the above Git repo
- Open a shell in project org.eclipse.e4.tutorial.contacts.build.tycho
- Run command “mvn clean install”
- Wait a while (first build takes long) until the build succeeds
- The results for Win (32/64) and Linux GTK (32/64) and Mac Cocoa (32/64) are in project org.eclipse.e4.tutorial.contacts.product/target/products
Good Tycho introductions can be found at http://www.vogella.com/articles/EclipseTycho/article.html and http://www.slideshare.net/jsievers/building-eclipse-plugins-and-rcp-applications-with-tycho-ece-2012.
The Eclipse 4 Application Model Extension
In the project org.eclipse.e4.tutorial.contacts.model.application you find a small extension to the Eclipse 4 application model, a custom PartStack named TutorialPartStack. This extension is used in the Application.e4xmi file of project org.eclipse.e4.tutorial.contacts. To open the Application.e4xmi in your running Eclipse IDE (in model editors), you have to export the project org.eclipse.e4.tutorial.contacts.model.application into your running IDE.
- To export, open MANIFEST.MF, in the Overview-Tab of the manifest editor click on “Export Wizard” and then choose “Install into host. Repository:”
- Restart your Eclipse SDK, now you should be able to open Application.e4xmi
- If you don’t want to install the model extension into your running Eclipse SDK, you could just start a new Eclipse SDK instance and make sure that the project org.eclipse.e4.tutorial.contacts.model.application is checked in the Run-Configuration.
Any feedback on the tutorial projects would be highly appreciated.