Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

Eclipse e4 (Eclipse 4.1 Application Platform) - Tutorial

Lars Vogel

Version 5.1

19.03.2011

Revision History
Revision 0.114.02.2009Lars Vogel
created
Revision 0.2 - 5.116.02.2009 - 19.03.2011Lars Vogel
bug fixes and enhancements

Eclipse e4

This tutorial gives an overview about the Eclipse 4.1 application platform which was created as part of the Eclipse e4 project. This tutorial is based on the Eclipse 4.1 M6 Release.


Table of Contents

1. Eclipse 4.0 SDK and Eclipse e4
1.1. Overview
1.2. About this tutorial
2. Installation
3. Your first e4 application
3.1. Create project
3.2. Launch
4. Steps for creating an e4 application
5. The concept of the modeled workbench
5.1. The model
5.2. e4 WorkbenchModel Editor
5.3. Contributing to the e4 model
5.4. Merging model elements at startup
5.5. Where to find the meta-model
6. Programming model with Dependency Injection and Annotations
6.1. e4 runtime
6.2. Using Dependency Injection
6.3. Using Dependency Injection in non-model objects
6.4. IEclipseContext
6.5. Available services
6.6. Annotations for application hooks
6.7. Example
7. Overview of selected services
7.1. Model Service
7.2. Selection service
7.3. Part service
8. Event Bus and EventAdmin Service
9. Styling your UI with css
9.1. Defining the stylesheet
9.2. Using the styling
10. Getting started with the Todo application
10.1. Create project
10.2. Add dependencies
10.3. Create product configuration
10.4. Maintain Extension points
10.5. Create the initial workbench model
10.6. Run your application
11. Parts, Toolbar and Menu
11.1. Add a part to the application
11.2. Menu, Toolbar and command handler
11.3. Add a container
12. Styling the todo application
12.1. Create stylesheet
12.2. Use css via property at startup
12.3. Theme Manager and switching styles
13. Services
13.1. Using services
13.2. Todo model and service interface
13.3. Todo model service
13.4. Using the model service
14. Using the selection and part service
15. Contribute model elements via plugins
15.1. Contribute model elements
15.2. Create new plugin
15.3. Contributing via fragments
15.4. Contributing via processors
16. Deployment
17. More to come
18. Life Cycle Hooks
18.1. Overview
19. Renderer
19.1. Overview
19.2. Extend the e4 application model
19.3. Create your new e4 Application
19.4. Define your renderer and the renderer factory
19.5. Register your factory via extension point
19.6. Run your application
20. e4 and Eclipse RAP
21. Tips
21.1. Where do I find the initial application model of the Eclipse SDK
21.2. Allow drag and drop for your parts in the workbench
21.3. Model access at runtime
21.4. DI in OSGi standalone environments
21.5. Persists user changes
21.6. Styling the Eclipse 4.0 SDK
22. Source codee
22.1. Getting the e4 source code
22.2. org.eclipse.e4.ui.internal.workbench.swt.E4Application
22.3. org.eclipse.e4.ui.internal.workbench.ResourceHandler
22.4. Other important classes
23. Thank you
24. Questions and Discussion
25. Links and Literature
25.1. Source Code

1. Eclipse 4.0 SDK and Eclipse e4

1.1. Overview

Eclipse e4 project introduces a new set of technologies into the Eclipse platform that make Eclipse plugins and Eclipse RCP applications easier to write, more configurable and easier to reuse. This article is based on the Eclipse 4.1 SDK.

The major enhancements in Eclipse e4 compared to Eclipse 3.x are:

  • The Eclipse workbench UI is described by an EMF model

  • The workbench model is available at design- and runtime

  • Eclipse widgets can be styled via CSS style sheets

  • Eclipse e4 supports dependency injection for services into model components

  • The model elements are decoupled from their presentation via a Renderer Framework.

1.2. About this tutorial

The following description will start with the creation of a e4 based application via a wizard to allow people to get quickly started. It describes the modeled workbench concept and the new programming model which is based on annotations and dependency injection. It then covers the declarative styling introduced in e4.

The remainder of the tutorial will be used to develop a e4 based todo application.