SlideShare a Scribd company logo
Eclipse 4.0
   and e4


Chris Aniszczyk
Principal Software Engineer
zx@redhat.com
http://aniszczyk.org
http://twitter.com/caniszczyk
Howdy!
• Hack Eclipse/OSGi/Git
• Evangelist at Red Hat
• Involved heavily at Eclipse
  – Eclipse Foundation Board of Directors
  – Co-lead PDE and EGit
• Hacking on open source for a decade
  – Gentoo Linux, Eclipse, Fedora...
• I like running (5K @ ~18min)
Agenda

Why e4?

Eclipse 3.X and e4
                  l
e4 workbench mode

Styling and Services

Compatibility Layer

 Conclusion and Q&A
Lexicon
e4 is an Eclipse.org project for
platform-related incubation, it’s not a
product!

Eclipse 4.0 is a release that contains
some technology from the e4 project
Why e4?
• Innovate or become irrelevant
• Use e4 technologies as a
  basis for Eclipse 4.X (some
  will show up in the 3.x
  stream)
• Engage the open source
  community
• Build a better Eclipse
   – Make it more flexible
   – Prepare for the web
   – Dynamic languages
   – Fix our mistakes
Eclipse Competition...
Why change?



“We’ve already built all our plug-ins.

The most important thing is
                     don’t break us.”



                           (Yes, there is a compatibility layer.)
Eclipse is mature and huge...




                            8
Foundations need to evolve...
   Eclipse Competition...




           Francois Schnell, http://www.flickr.com/photos/frenchy/30217773/
Eclipse 4.0 SDK
Early Adopter Release
       July 2010
11
12
e4 Example
Applications
Eclipse e4
Eclipse e4
So, what’s wrong with
Eclipse 3.X?
Problems with Eclipse 3.x

• Complex
• Lots of API
• Platform functionality
  via singletons
• Not easy to test
• Not a consistent way to
  define the UI
• UI makes assumptions,
  e.g. Editors / Views
• Easy Skinning

• The browser is more
  powerful now... RIAs...
If only Eclipse application
development would be
easier...




                              8
Eclipse e4 – Building blocks
        Declarative Styling



          Rendering Engine


             Modeled Workbench


                    Dependency Injection


                IEclipseContext


             Core Services
The Modeled Workbench
The e4 Workbench Model
Each application has its live model... think of the browser DOM...



                                                • Built using EMF
                                                • Workbench window
                                                    – Menu with menu items
                                                    – Window Trim, e.g.
                                                      toolbar with toolbar
                                                      items
                                                    – Parts Sash Container
                                                         • Parts
                                                    – Part Stack (CTabFolder)
                                                         • Parts
                                                    – Handlers
                                                    – Key Bindings
                                                    – Commands
The Model is Flexible
No distinction between View/ Editor

Perspectives are optional

Stack / Sash are optional

Several windows easily possible

Flexible Toolbars
Parts in e4


Plain Old Java Objects
(POJO‘s)
Before e4... inheritance ruled...




OBJECT



    EVENTMANAGER



         WORKBENCHPART

                   VIEWPART

                              VIEW
How is this model
translated into UI
components?
Model and UI Renderers
Model

              I don’t care
             who draws me




            • The Workbench model
              is independent of a
              specific UI toolkit
Renderers
Renderer Factory

Eclipse default is the
SWT Renderer

Can be selected at
Startup via parameter
Renderers
Renderer Factory                          Widget Renderer




                      Returns for every
                      model element
Widget Renderer
• Each UI elements gets a renderer
• Renderer manage Lifecycle of the UI-
  Element
  – Creation
  – Model to widget binding
  – Rendering
  – Disposal
e4 and Styling
Styling in Eclipse 3.x

• UI styling via
  – The Presentation API
  – Custom Widgets
• Very limited
In reality all
RCP apps look
like the an IDE
Eclipse 3.X - IDE                             Eclipse e4 – CSS Styling
feeling




 Example from Kai Toedter

 Some elements cannot currently not be styled:

 • Menu bar background
 • Table headers

 e4 supports theme switching during runtime
How to enable CSS Styling
Property "applicationCSS” in extension point
  org.eclipse.core.runtime.products

<extension
   id="product"
   point="org.eclipse.core.runtime.products">
   <product
     application="org.eclipse.e4.ui.workbench.swt.application"
     name="E4 Contacs Demo">
     <property
        name="applicationCSS"
        value="platform:/plugin/contacts/css/dark.css">
     </property>
   </product>
</extension>
Example CSS
Label {
   font: Verdana 8px;
   color: rgb(240, 240, 240);
}

Table {
   background-color: gradient radial #575757 #101010 100%;
   color: rgb(240, 240, 240);
   font: Verdana 8px;
}

ToolBar {
   background-color: #777777 #373737 #202020 50% 50%;
   color: white;
   font: Verdana 8px;
}
Assign custom attributes
• Java

  Label label =
     new Label(parent, SWT.NONE);
  label.setData("org.eclipse.e4.ui.css.id",
                   "SeparatorLabel");

• CSS
  #SeparatorLabel {
      color: #f08d00;
  }
The e4 Programming
       Model
Dependency Injection
• Inversion of control: The necessary
  functionality is injected into the class



                                              s
                                       va Clas
                                  Ja
Dependency Injection in e4

• JSR 330 compatible injection
  implementation (think Google Guice)
  – @javax.inject.Inject – Field,
    Constructor and Method injection
  – @javax.inject.Named – Specify a custom
    qualifier to context object (default is fully
    qualified classname of the injected type)
• e4 specific annotations... @Optional
s
                va Clas
           Ja
                                        
 Services are injected
                                          via the the e4
                                          framework

public class ListView {

  @Inject
  private IEclipseContext context;
  @Inject
   private Logger logger;

  @Inject
  public ListView(Composite parent) {
      // ...
CODE EXAMPLES
  rs-photo, http://www.flickr.com/photos/rs-foto/2129343084/sizes/l/
Access preference values
IPreferenceStore store =
   IDEWorkbenchPlugin.getDefault()
     .getPreferenceStore();

boolean saveBeforeBuild = store
                                      3.x
    .getBoolean(SAVE_BEFORE_BUILD);



@Inject
 @Preference(SAVE_BEFORE_BUILD)
 boolean saveBeforeBuild;
                                      4.x
Associate help context with control
getSite()
  .getWorkbenchWindow()
   .getWorkbench()
      .getHelpSystem().setHelp(
                                         3.x
        viewer.getControl(), some_id);

@Inject

IWorkbenchHelpSystem helpSystem;

...                                      4.x
helpSystem.setHelp(
        viewer.getControl(), some_id);
Services
Eclipse Application Services (“Twenty
                  Things”)

   Editor lifecycle                Long-running
   Receiving input                  operations
   Producing selection             Progress reporting
   Standard dialogs                Error handling
   Persisting UI state             Navigation model
   Logging                         Resource management
   Interface to help               Status line
    system                          Drag and drop
   Menu contributions              Undo/Redo
   Authentication                  Accessing preferences
   Authorization

                         Don‘t forget: OSGi services are also
                          available via dependency injection
Compatibility Layer
Compatibility Layer

• Compatibility layer centers around
  org.eclipse.ui.workbench
  – Contains code to host 3.x API on e4
• Note: The 3.x workbench API with
  some exceptions...
  – org.eclipse.ui.presentations
  – org.eclipse.ui.themes
  – Activities and Capabilities
• API clean plug-ins will run fine
Eclipse 4.0 SDK
Thanks for listening!
For further questions:
caniszczyk@gmail.com
http://aniszczyk.org
http://twitter.com/caniszczyk
Where to go from here
Eclipse e4 Website
  http://www.eclipse.org/e4
Eclipse e4 Wiki
  http://wiki.eclipse.org/E4
Eclipse e4 Whitepaper
  http://www.eclipse.org/e4/resources/e4-whitepaper.php


Eclipse 4.1 will most likely ship
as part of the Indigo release...
License & Acknowledgements
• This work is licensed under:

  –   http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US




• Thank you...
  –   Boris Bokowski, IBM
  –   Tom Schindl, BestSolution
  –   Kai Tödter, Siemens AG
  –   Lars Vogel, SAP AG

More Related Content

PDF
Life at Twitter + Career Advice for Students
PDF
Open Source Craft at Twitter
KEY
Open Source Compliance at Twitter
PDF
Creating an Open Source Office: Lessons from Twitter
PDF
The Open Source... Behind the Tweets
PDF
Rockstar Android Testing (Mobile TechCon Munich 2014)
PPTX
Guide to open source
PDF
Mastering Android Development Tools
Life at Twitter + Career Advice for Students
Open Source Craft at Twitter
Open Source Compliance at Twitter
Creating an Open Source Office: Lessons from Twitter
The Open Source... Behind the Tweets
Rockstar Android Testing (Mobile TechCon Munich 2014)
Guide to open source
Mastering Android Development Tools

What's hot (11)

PPTX
WordPress Under Control
PDF
How to Contribute to Pinax
PDF
What every successful open source project needs
PPTX
Intro to open source - 101 presentation
PDF
Collaborating on GitHub for Open Source Documentation
PDF
Osgeo incubation-2014
PDF
DevoxxUK 2014 "Moving to a DevOps Mode: Easy, Hard, or Just Plain Terrifying?"
KEY
Django Package Thunderdome by Audrey Roy & Daniel Greenfeld
PPTX
Collaborating on GitHub for Open Source Documentation
PPTX
OpenStack Documentation in the Open
PDF
Introduction to License Compliance and My research (D. German)
WordPress Under Control
How to Contribute to Pinax
What every successful open source project needs
Intro to open source - 101 presentation
Collaborating on GitHub for Open Source Documentation
Osgeo incubation-2014
DevoxxUK 2014 "Moving to a DevOps Mode: Easy, Hard, or Just Plain Terrifying?"
Django Package Thunderdome by Audrey Roy & Daniel Greenfeld
Collaborating on GitHub for Open Source Documentation
OpenStack Documentation in the Open
Introduction to License Compliance and My research (D. German)
Ad

Similar to Eclipse e4 (20)

PDF
Learn about Eclipse e4 from Lars Vogel at SF-JUG
PDF
Eclipse e4 - Google Eclipse Day
PDF
Eclipse 40 - Eclipse Summit Europe 2010
PPTX
Eclipse 40 and Eclipse e4
PPTX
Eclipse e4 on Java Forum Stuttgart 2010
PPTX
Eclipse e4 Overview
PPTX
Eclipse Overview
PPT
Eclipse 2011 Hot Topics
PPT
Spring - a framework written by developers
PDF
Java 8 selected updates
PPT
Creation&imitation
PDF
Play Framework and Activator
PDF
Build Java Web Application Using Apache Struts
PDF
Eclipse plug in development
PPTX
Protractor survival guide
PDF
UKLUG 2012 - XPages, Beyond the basics
PDF
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
PDF
Typesafe stack - Scala, Akka and Play
PPTX
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
PDF
Alfresco Business Reporting - Tech Talk Live 20130501
Learn about Eclipse e4 from Lars Vogel at SF-JUG
Eclipse e4 - Google Eclipse Day
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 and Eclipse e4
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 Overview
Eclipse Overview
Eclipse 2011 Hot Topics
Spring - a framework written by developers
Java 8 selected updates
Creation&imitation
Play Framework and Activator
Build Java Web Application Using Apache Struts
Eclipse plug in development
Protractor survival guide
UKLUG 2012 - XPages, Beyond the basics
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
Typesafe stack - Scala, Akka and Play
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Alfresco Business Reporting - Tech Talk Live 20130501
Ad

More from Chris Aniszczyk (20)

PDF
Bringing an open source project to the Linux Foundation
PDF
Starting an Open Source Program Office (OSPO)
PDF
Open Container Initiative Update
PDF
Cloud Native Landscape (CNCF and OCI)
PDF
Rise of Open Source Programs
PDF
The Open Container Initiative (OCI) at 12 months
PDF
Open Source Lessons from the TODO Group
PDF
Getting Students Involved in Open Source
PDF
Apache Mesos at Twitter (Texas LinuxFest 2014)
PDF
Evolution of The Twitter Stack
PDF
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
PPT
Effective Git with Eclipse
ODP
Evolution of Version Control In Open Source
ODP
ESE 2010: Using Git in Eclipse
KEY
SWTBot Tutorial
KEY
Helios in Action: Git at Eclipse
KEY
Introduction to EclipseRT (JAX 2010)
KEY
EclipseRT, Equinox and OSGi
KEY
Open Source From The Trenches: How to Get Involved with Open Source and be Su...
PPT
Understanding and Using Git at Eclipse
Bringing an open source project to the Linux Foundation
Starting an Open Source Program Office (OSPO)
Open Container Initiative Update
Cloud Native Landscape (CNCF and OCI)
Rise of Open Source Programs
The Open Container Initiative (OCI) at 12 months
Open Source Lessons from the TODO Group
Getting Students Involved in Open Source
Apache Mesos at Twitter (Texas LinuxFest 2014)
Evolution of The Twitter Stack
Effective Development With Eclipse Mylyn, Git, Gerrit and Hudson
Effective Git with Eclipse
Evolution of Version Control In Open Source
ESE 2010: Using Git in Eclipse
SWTBot Tutorial
Helios in Action: Git at Eclipse
Introduction to EclipseRT (JAX 2010)
EclipseRT, Equinox and OSGi
Open Source From The Trenches: How to Get Involved with Open Source and be Su...
Understanding and Using Git at Eclipse

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Mobile App Security Testing_ A Comprehensive Guide.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
NewMind AI Monthly Chronicles - July 2025
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”

Eclipse e4

  • 1. Eclipse 4.0 and e4 Chris Aniszczyk Principal Software Engineer zx@redhat.com http://aniszczyk.org http://twitter.com/caniszczyk
  • 2. Howdy! • Hack Eclipse/OSGi/Git • Evangelist at Red Hat • Involved heavily at Eclipse – Eclipse Foundation Board of Directors – Co-lead PDE and EGit • Hacking on open source for a decade – Gentoo Linux, Eclipse, Fedora... • I like running (5K @ ~18min)
  • 3. Agenda Why e4? Eclipse 3.X and e4 l e4 workbench mode Styling and Services Compatibility Layer Conclusion and Q&A
  • 4. Lexicon e4 is an Eclipse.org project for platform-related incubation, it’s not a product! Eclipse 4.0 is a release that contains some technology from the e4 project
  • 5. Why e4? • Innovate or become irrelevant • Use e4 technologies as a basis for Eclipse 4.X (some will show up in the 3.x stream) • Engage the open source community • Build a better Eclipse – Make it more flexible – Prepare for the web – Dynamic languages – Fix our mistakes
  • 7. Why change? “We’ve already built all our plug-ins. The most important thing is don’t break us.” (Yes, there is a compatibility layer.)
  • 8. Eclipse is mature and huge... 8
  • 9. Foundations need to evolve... Eclipse Competition... Francois Schnell, http://www.flickr.com/photos/frenchy/30217773/
  • 10. Eclipse 4.0 SDK Early Adopter Release July 2010
  • 11. 11
  • 12. 12
  • 16. So, what’s wrong with Eclipse 3.X?
  • 17. Problems with Eclipse 3.x • Complex • Lots of API • Platform functionality via singletons • Not easy to test • Not a consistent way to define the UI • UI makes assumptions, e.g. Editors / Views • Easy Skinning • The browser is more powerful now... RIAs...
  • 18. If only Eclipse application development would be easier... 8
  • 19. Eclipse e4 – Building blocks Declarative Styling Rendering Engine Modeled Workbench Dependency Injection IEclipseContext Core Services
  • 21. The e4 Workbench Model Each application has its live model... think of the browser DOM... • Built using EMF • Workbench window – Menu with menu items – Window Trim, e.g. toolbar with toolbar items – Parts Sash Container • Parts – Part Stack (CTabFolder) • Parts – Handlers – Key Bindings – Commands
  • 22. The Model is Flexible No distinction between View/ Editor Perspectives are optional Stack / Sash are optional Several windows easily possible Flexible Toolbars
  • 23. Parts in e4 Plain Old Java Objects (POJO‘s)
  • 24. Before e4... inheritance ruled... OBJECT EVENTMANAGER WORKBENCHPART VIEWPART VIEW
  • 25. How is this model translated into UI components?
  • 26. Model and UI Renderers Model I don’t care who draws me • The Workbench model is independent of a specific UI toolkit
  • 27. Renderers Renderer Factory Eclipse default is the SWT Renderer Can be selected at Startup via parameter
  • 28. Renderers Renderer Factory Widget Renderer Returns for every model element
  • 29. Widget Renderer • Each UI elements gets a renderer • Renderer manage Lifecycle of the UI- Element – Creation – Model to widget binding – Rendering – Disposal
  • 31. Styling in Eclipse 3.x • UI styling via – The Presentation API – Custom Widgets • Very limited
  • 32. In reality all RCP apps look like the an IDE
  • 33. Eclipse 3.X - IDE Eclipse e4 – CSS Styling feeling Example from Kai Toedter Some elements cannot currently not be styled: • Menu bar background • Table headers e4 supports theme switching during runtime
  • 34. How to enable CSS Styling Property "applicationCSS” in extension point org.eclipse.core.runtime.products <extension id="product" point="org.eclipse.core.runtime.products"> <product application="org.eclipse.e4.ui.workbench.swt.application" name="E4 Contacs Demo"> <property name="applicationCSS" value="platform:/plugin/contacts/css/dark.css"> </property> </product> </extension>
  • 35. Example CSS Label { font: Verdana 8px; color: rgb(240, 240, 240); } Table { background-color: gradient radial #575757 #101010 100%; color: rgb(240, 240, 240); font: Verdana 8px; } ToolBar { background-color: #777777 #373737 #202020 50% 50%; color: white; font: Verdana 8px; }
  • 36. Assign custom attributes • Java Label label = new Label(parent, SWT.NONE); label.setData("org.eclipse.e4.ui.css.id", "SeparatorLabel"); • CSS #SeparatorLabel { color: #f08d00; }
  • 38. Dependency Injection • Inversion of control: The necessary functionality is injected into the class s va Clas Ja
  • 39. Dependency Injection in e4 • JSR 330 compatible injection implementation (think Google Guice) – @javax.inject.Inject – Field, Constructor and Method injection – @javax.inject.Named – Specify a custom qualifier to context object (default is fully qualified classname of the injected type) • e4 specific annotations... @Optional
  • 40. s va Clas Ja Services are injected via the the e4 framework public class ListView { @Inject private IEclipseContext context; @Inject private Logger logger; @Inject public ListView(Composite parent) { // ...
  • 41. CODE EXAMPLES rs-photo, http://www.flickr.com/photos/rs-foto/2129343084/sizes/l/
  • 42. Access preference values IPreferenceStore store = IDEWorkbenchPlugin.getDefault() .getPreferenceStore(); boolean saveBeforeBuild = store 3.x .getBoolean(SAVE_BEFORE_BUILD); @Inject @Preference(SAVE_BEFORE_BUILD) boolean saveBeforeBuild; 4.x
  • 43. Associate help context with control getSite() .getWorkbenchWindow() .getWorkbench() .getHelpSystem().setHelp( 3.x viewer.getControl(), some_id); @Inject IWorkbenchHelpSystem helpSystem; ... 4.x helpSystem.setHelp( viewer.getControl(), some_id);
  • 45. Eclipse Application Services (“Twenty Things”)  Editor lifecycle  Long-running  Receiving input operations  Producing selection  Progress reporting  Standard dialogs  Error handling  Persisting UI state  Navigation model  Logging  Resource management  Interface to help  Status line system  Drag and drop  Menu contributions  Undo/Redo  Authentication  Accessing preferences  Authorization  Don‘t forget: OSGi services are also available via dependency injection
  • 47. Compatibility Layer • Compatibility layer centers around org.eclipse.ui.workbench – Contains code to host 3.x API on e4 • Note: The 3.x workbench API with some exceptions... – org.eclipse.ui.presentations – org.eclipse.ui.themes – Activities and Capabilities • API clean plug-ins will run fine
  • 49. Thanks for listening! For further questions: caniszczyk@gmail.com http://aniszczyk.org http://twitter.com/caniszczyk
  • 50. Where to go from here Eclipse e4 Website http://www.eclipse.org/e4 Eclipse e4 Wiki http://wiki.eclipse.org/E4 Eclipse e4 Whitepaper http://www.eclipse.org/e4/resources/e4-whitepaper.php Eclipse 4.1 will most likely ship as part of the Indigo release...
  • 51. License & Acknowledgements • This work is licensed under: – http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en_US • Thank you... – Boris Bokowski, IBM – Tom Schindl, BestSolution – Kai Tödter, Siemens AG – Lars Vogel, SAP AG