Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
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
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
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
29. Widget Renderer
• Each UI elements gets a renderer
• Renderer manage Lifecycle of the UI-
Element
– Creation
– Model to widget binding
– Rendering
– Disposal
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>
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) {
// ...
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