Transcript Slide 1

What’s in e4
Tom Schindl, Boris Bokowski, Kai Tödter,
Hallvard Traetteberg, Yves Yang
1
e4
“The mission of the e4 project is to build a next
generation platform for pervasive, component-based
applications and tools.”
2
e4 – (Historic) Facts

2008



Announcement of new project idea short before
EclipseCon
First mock up presentation at Eclipse 2008
e4 Summit in Ottawa (22nd / 23rd May)


Project groups formed
The modeled workbench was born
e4 – (Historic) Facts

2009

Release of e4 0.9 as a tech-preview




Backed up by an live EMF Modeled Application
Backwards compatibility layer to host important unmodified
parts of 3.5 in an e4 workbench (JDT, CVS)
Support for Declarative Styling
Embedding of WebUIs
e4 – Why? Why now?

The current code is hard and is getting harder to
maintain


Different MVC implementations
Legacy code because of historic platform limitations
Shell
MenuBar
CTabFolder
PackageExplorer
Hierarchy
Shell
MenuBar
CTabFolder
PackageExplorer
Hierarchy
e4 – Why? Why now?

New competitors in RCP



RIA-Frameworks like Flex, Sliverlight, JavaFX
GWT, Ajax-Frameworks (Qooxdoo, Ext-Js, …)
New UI-Requirements

Shift away from native looking UIs to „flashy“ UIs with
gradients, ...
e4 – Project Overview
e4-Core
Modeled Application
Core Services
DI, EclipseContext
Workbench + RenderingEngine
Declarative Styling
XWT
TM
Flexible Resources
WebUI
...
e4-Addons
Rational Software | Eclipse
e4
 Place for innovation
 Not a product
 e4 technologies will be used as the basis of Eclipse 4.0
 Some e4 technologies will end up in 3.x
 Eclipse 4.0 SDK may not include all technologies
explored as part of e4
8
IBM Confidential
© 2009 IBM Corporation
Programming Model
 Pull together and simplify the important APIs
– “Eclipse Application Services”
– focus on client API (separate from SPI)
 Dependency Injection
– static keyword verboten (no Singletons)
 API should map easily to other languages
– e.g., JavaScript
– avoid subclassing across component boundaries
– avoid Java-isms
9
Rational Software | Eclipse
Why “application services”?
 API surface has grown a lot
 Important APIs are hard to identify (wheat / chaff)
 Need a small set of “most important” Eclipse API
 And, there are new requirements
– E.g. embed pieces of web UI in Eclipse as first class
components
10
10
IBM Confidential
© 2009 IBM Corporation
Rational Software | Eclipse
Eclipse Application Services (“Twenty Things”)
 Editor lifecycle
 Long-running operations
 Receiving input
 Progress reporting
 Producing selection
 Error handling
 Standard dialogs
 Navigation model
 Persisting UI state
 Resource management
 Logging
 Status line
 Interface to help system
 Drag and drop
 Menu contributions
 Undo/Redo
 Authentication
 Accessing preferences
 Authorization
11
11
IBM Confidential
© 2009 IBM Corporation
Rational Software | Eclipse
Contexts and Dependency Injection
 “Context”
– Locates services and provides them to consumers
– Maps keys to values where values can be computed, w.
pluggable lookup
– Interoperable with OSGi service registry
 Dependency Injection
– Constructor, method and field injection
– Identified by Java annotations (JSR 330)
– Eliminates dependencies on containers
12
IBM Confidential
© 2009 IBM Corporation
Example Code
public class ExampleView {
@Inject ExampleView(Composite parent,
IWorkspace workspace,
IMemento persistedState) {
// ...
}
@Inject setInput(IResource input) {
// ...
}
}
13
e4 – Modeled Application

e4-Applications are backed up by an live EMF-Model
e4 – Modeled Application
e4 – Modeled Application

The concept of renderers
org.eclipse.e4.workbench
EMF-Workbench-Model
AbstractRenderer
Contribute
Synchronize
SWTRenderer
org.eclipse.e4.workbench.renderer.swt
QTRenderer
at.bestsolution.e4.renderer.qtjambi
e4 – Modeled Application
e4 – Modeled Application
Kai Tödter
Siemens Corporate Technology
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
7/17/2015
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
20
7/17/2015
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
21
7/17/2015
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
22
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;
}
7/17/2015
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
23


Menu bar background
Table headers
Partly implemented:
 Gradients
Planned:
 Having similar capabilities compared with
WebKit’s gradients
7/17/2015
© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
24
Rational Software | Eclipse
e4 R0.9 - Web Integration
 We are seeing a mix of web and desktop UIs
– Similar but different
– Need appropriate experiences
– Solution: re-use components, not applications
 (Sub-)work areas:
– JavaScript modularity
– JavaScript debugging
– Web to desktop
– Desktop to web
25
25
IBM Confidential
© 2009 IBM Corporation
Rational Software | Eclipse
JavaScript Modularity
 JavaScript modularity framework based on OSGi concepts
– Runs as a nested framework within an OSGi instance
– Bundle and script file level dependencies (using JSON)
– Communicate with Java via OSGi services or Eclipse extensions (and EAS)
 Needed for building enterprise-grade web applications
 Status: Done, but needs to be stressed/used more
{
"Bundle-SymbolicName":"sample.jsbundle",
"Bundle-Version":"1.0",
"Bundle-ScriptPath":"script.js",
"Import-Package":"a.resource;version=[1.0.0,2.0.0)",
"Export-Package":"sample.resource;version=1.0.0",
"Require-Bundle:"some.other.bundle",
}
26
26
IBM Confidential
© 2009 IBM Corporation
JavaScript Debugging
 Implemented a debug runtime for Rhino (extensible to
other VMs)
 working on full, integrated JavaScript debugging for
Eclipse (including Java/JS boundary crossing)
 Working with ATF to support Mozilla based runtimes
 Expect to be able to support Chrome
 Have integrated with JSDT to set breakpoints, etc.
27
Rational Software | Eclipse
Embedding Web UIs (Web to desktop)
 Run web components on the desktop
 Uses the SWT Browser control
– Backed by IE, Mozilla, or Safari
– Improved API for Java-JavaScript interop in 3.5
 Eclipse as an OpenSocial Gadgets container
 Provide first class interoperability with Eclipse
– EAS / “20 things”
• E.g. standard dialogs, progress reporting, preferences,
selection...
– Make available to embedded pages via JS
28
28
IBM Confidential
© 2009 IBM Corporation
OpenSocial Gadgets
29
Rational Software | Eclipse
e4 R0.9 Clone of PDE Site Editor
30
30
IBM Confidential
© 2009 IBM Corporation
TM – Motivation
 Hand-coding GUIs is hard
– GUI frameworks can be complex
– conceptual gap between concrete GUI and the GUI code
 What works?
– GUI builders are very useful for part of the design task
• ... but handles only look & feel, behavior must still be coded
– HTML+DOM+Javascript has caught on
• ... but XML is not the best tree-structured data model around
– Model-based techniques are maturing and more wide-spread
• ... but has not really been successfully applied to UIs (until now?)
 Can a combination of these be used for e4?
31
TM – model and architecture
 Ecore-based model of GUI elements
– hierarchy of widgets
– simple elements – label, text field, buttons, list, ...
– composites – generic, group box, tab folder, ...
– coming soon:
• table and tree widgets
• styling with CSS
• 2d graphics
– natural extension of modeled workbench UI
 EMF API & tools are used to manage TM instances
– Java code with static and reflective API
– generic editors and model-based techniques
– transform with ATL, store with Teneo, share with CDO ...
32
Tree-based editor with preview
33
Rational Software | Eclipse
e4 R0.9 - Flexible Resources
 Solve some real-world problems, w.r.t. constraints on the layout of
projects in the workspace
 Implemented to be backwards compatible with R3.x
 Enhancements:
–
–
–
–
Define variables at project level, with linked resources relative to them
Groups == virtual folders of links to resources elsewhere on disk
Exclusion filters on projects and folders
Creation/manipulation of linked resources via D&D
• e.g. drag file tree onto Eclipse can create links and groups
– Edit link locations; convert links between absolute and variable relative
 Work underway to graduate this work in 3.x (3.6 target)
36
36
IBM Confidential
© 2009 IBM Corporation
Rational Software | Eclipse
What’s next
 “Eclipse SDK R4.0” to be delivered July 2010
 Goals
– All SDK R3.6 plug-ins hosted and running
– Ready for wider consumption
 But(!) this is the first release of a significantly new codebase
– It will not be on the Helios release train
• Early adopters in community will be moving
– Need significant real-world testing
• Help us make the compatibility bulletproof
 Expect to be on 2011 release train
– Requirement: All other release train projects run
37
IBM Confidential
© 2009 IBM Corporation
XWT
Eclipse XML Windowing Toolkit
Yves YANG (Soyatec)
[email protected]
38
Agenda
 What is XWT?
 Architecture
 Key features
 Q&A
39
What is XWT?
XWT stands for XML Windowing Toolkit. It is a
XML based UI declarative solution for eclipse.
XWT targets to be a UI Presentation Foundation
for eclipse by providing:
 A common infrastructure that enables UI tools to
work together
 Component assembling application
development environment
40
Abstraction / Domain
Domain
Developer
Technical
Developer
UI Code
Editor
Visual
Designer
Model
Designer
Modeling
Tools
XWT
SWT
41
JFace
JFace Data Binding
…
Technology
Product overview
Model
Designer
TM
PMF
Domain
Developer
Technical
Developer
…
EMFDSL
Tools
EMF
VE
XWT
Event
Handling
UI
Control
Trigger
Java
Data binding
Java
EMF
XML
Styling
...
Inline
CSS
Java
Implementation
42
Architecture
43
Key features
 Runtime In SWT/JFace
 Full integrations
–
–
–
–
JFace Data Binding
CSS
e4 workbench
Eclipse RCP 3.x
 Reusable Presentation Component
 High extensibility
 WYSIWYG Designer
44
Rational Software | Eclipse
Further reading
 “Eclipse has a future.”
– http://dev.eclipse.org/blogs/mcqjustmcq/2009/07/25/eclipse-has-a-future/
 “White Paper: e4 Technical Overview”
– http://eclipse.org/e4/resources/e4-whitepaper.php
 Websites:
– e4 Wiki -- http://wiki.eclipse.org/E4
– e4 Homepage -- http://eclipse.org/e4
45
IBM Confidential
© 2009 IBM Corporation
Rational Software | Eclipse
Comments?
Questions?
46
IBM Confidential
© 2009 IBM Corporation
Why change?
“We’ve already built all our plug-ins.
The most important thing is don’t break us.”
(Yes, there will be a compatibility layer.)
47
48
Francois Schnell, http://www.flickr.com/photos/frenchy/30217773/