eclipse e4 - google eclipse day

20
Building Applications with Eclipse 4.x (e4) Lars Vogel | Tom Schindl

Upload: lars-vogel

Post on 17-May-2015

2.102 views

Category:

Technology


8 download

DESCRIPTION

Overview of Eclipse 4.x on the Google Developer Day.

TRANSCRIPT

Page 1: Eclipse e4 - Google Eclipse Day

Building Applications with Eclipse 4.x (e4)

Lars Vogel

|

Tom Schindl

Page 2: Eclipse e4 - Google Eclipse Day

About Tom

✤ CEO BestSolution Systemhaus GmbH

✤ Eclipse Committer

✤ e4

✤ Platform UI

✤ EMF

✤ Projectlead: UFaceKit, Nebula

✤ Member of the Architectual Council

Page 3: Eclipse e4 - Google Eclipse Day

Works as independent Eclipse and Android Developer and Trainer

Maintains http://www.vogella.de Java, Eclipse and Android related Tutorials with ~40 000 visitors per day

Starting to publish (e)books at Amazon

About Lars

Page 4: Eclipse e4 - Google Eclipse Day

• Eclipse e4 Overview

• Model

• Dependency Injection

• Styling

• Compatibility Layer

• JavaFX and Eclipse e4

• Q&A

Presentation

Page 5: Eclipse e4 - Google Eclipse Day

What is the purpose of the Eclipse 4.x project?

Page 6: Eclipse e4 - Google Eclipse Day

Eclipse e4 Scope

Make development for Eclipse easier

Page 7: Eclipse e4 - Google Eclipse Day

It is not making development with easier.

„Normal“ developer should see no difference, except...

Page 8: Eclipse e4 - Google Eclipse Day

Eclipse 3.x - areas of improvement

• Testing

• Consistent way to define the UI

• Styling the application

• Easy way to use OSGI services

Page 9: Eclipse e4 - Google Eclipse Day

9

If I only had a consistent view of the Eclipse workbench

Page 10: Eclipse e4 - Google Eclipse Day

The e4 Workbench Model

• 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

Page 11: Eclipse e4 - Google Eclipse Day

• Only models the Application (frame)

Limits of the e4 application model

Modeled Workbench

Content of the individual Parts not

included in the model

Page 12: Eclipse e4 - Google Eclipse Day

The e4 Programming Model

Page 13: Eclipse e4 - Google Eclipse Day

Dependency Injection in e4

• JSR 330 compatible injection implementation– @javax.inject.Inject – Field, Constructor and

Method – @javax.inject.Named

• e4 specific annotations, e.g. @Optional

Page 14: Eclipse e4 - Google Eclipse Day

public class ListView {

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

@Inject public ListView(Composite parent) { // ...

Services are injected via the the e4 framework

Java

Class

Page 15: Eclipse e4 - Google Eclipse Day

e4 CSS Styling

Page 16: Eclipse e4 - Google Eclipse Day

How to enable CSS StylingProperty "cssTheme” for extension point "org.eclipse.core.runtime.products" selects the initial theme

<extension id="product" point="org.eclipse.core.runtime.products"> <product application="org.eclipse.e4.ui.workbench.swt.E4Application" name="E4 Contacs Demo"> .... <property name="cssTheme" value="org.eclipse.e4.demo.contacts.themes.darkgradient"> </property>

....

Page 17: Eclipse e4 - Google Eclipse Day

Example CSSLabel { 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;}

Page 18: Eclipse e4 - Google Eclipse Day

Eclipse 4.2 planned to be the basis of Eclipse Juno SDK

4.2 still has some issues

And there will be Eclipse 3.8

Page 19: Eclipse e4 - Google Eclipse Day

e4: Where to go from here:Eclipse e4 Wikihttp://wiki.eclipse.org/E4

Eclipse 4.2 Application Tutorial – Lars Vogelhttp://www.vogella.de/articles/EclipseE4/article.html

Eclipse 4.0 Application Tutorial – Tom Schindlhttp://tomsondev.bestsolution.at/2010/07/28/eclipse-4-0-and-tutorial-on-writing-e4-rcp-application-released/

Page 20: Eclipse e4 - Google Eclipse Day

Plugins zur Produkt / Feature

• Fügen sie die folgenden Plugins Ihrem Feature hinzu– org.eclipse.e4.ui.workbench.addons.swt– org.eclipse.equinox.ds– org.eclipse.equinox.event– org.eclipse.equinox.util– org.eclipse.platform– org.eclipse.ui.forms– org.eclipse.ui.intro