SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
Rich Clients with Eclipse 4.0
Kai Tödter
Siemens Corporate Technology
11/2/2010 1© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
The Labs
Labs
 Lab 1: Generate “Hello, e4”
 Lab 2: Manual Application Creation
 Lab 3: Handlers & Command
 Lab 4: List View
 Lab 5: PartStacks & Sash
 Lab 6: New Model Fragment
 Lab 7: CSS Theming
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 2
Lab 1: Generate “Hello, e4”
 Start the SDK
 Select New/Other…/e4/e4 Application Project
 Name the project org.eclipse.e4.tutorial.hello
 Click “Next”
 Change property Name to Hello e4
 Change property Provider to your name
 Click “Finish”
11/2/2010 3© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 1: Launch “Hello, e4”
 Double-Click org.e4-tutorial.hello.product
 Click on “Launch an Eclipse Application” in the
Testing section
 If the launch fails, don’t worry…
 Open your org.e4-tutorial.hello.product launch
configuration, select the Plug-ins tab and add all
required plug-ins
 Launch again, this should work!
 Play around with the application
11/2/2010 4© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Manual Application Creation
 Create a Plug-in Project
org.eclipse.e4.tutorial.contacts
 Add a Product Extension
 Create a minimal Workbench Model
 Create a Product Configuration
 Launch the application
11/2/2010 5© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Create a Plug-in Project
 On the first wizard page
 Name the project org.eclipse.e4.tutorial.contacts
 Select Equinox as target platform
 On the second wizard page
 Change the Name property to e4 Contacts
 Put your name as Provider
 Uncheck Generate an Activator
 Click Finish
 Now your project is created
11/2/2010 6© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Create a Product Definition (1)
 Open the file META-INF/MANIFEST.MF
 Click on Extensions in the Overview tab
 This makes the Extensions tab visible if hidden
 Add a dependency to org.eclipse.equinox.app
 Save (Press CTRL s)
 Select the Extensions tab and add the
extension point
org.eclipse.core.runtime.products
 Make sure to put product in the ID field
11/2/2010 7© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Create a Product Definition (2)
 Add a product to the …products extension
 In the application field, put
org.eclipse.e4.ui.workbench.swt.E4Application
 Use e4 Contacts as product name
11/2/2010 8© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Minimal Workbench Model
 Select menu New/Other…/e4/Model/New
Application Model
 Put /org.eclipse.e4.tutorial.contacts as Container
 Click Finish, then the Application.e4xmi will be
opened in the e4 WorkbenchModel editor
 In the editor, click Window in the left area and
select Trimmed Window in the right area
 Click on the icon next to Trimmed Window
 Set Width to 800 ,Height to 600 and Label to e4
Contacts
11/2/2010 9© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Workbench Model Editor
11/2/2010 10© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Resulting Application.e4xmi
<?xml version="1.0" encoding="ASCII"?>
<application:Application xmi:version= "2.0"
xmlns:xmi= "http://www.omg.org/XMI"
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:application= "http://www.eclipse.org/ui/2010/UIModel/application"
xmlns:basic= "http://www.eclipse.org/ui/2010/UIModel/application/ui/basic"
xmi:id= "_PXE0EJ-qEd-iBNJWVQ-d9Q"
elementId= "org.eclipse.e4.tutorial.contacts.application" >
<children
xsi:type= "basic:TrimmedWindow"
xmi:id= "_eB6zsJ-xEd-iBNJWVQ-d9Q"
label= "e4 Contacts"
width= "800"
height= "600" />
</application:Application>
11/2/2010 11© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Create a Product Config (1)
 Create a product configuration
 Name it contacts
 Choose Use an existing product:
org.eclipse.e4.tutorial.contacts.product
 Click Finish
 Add dependencies
 org.eclipse.equinox.ds
 org.eclipse.equinox.event
 org.eclipse.e4.ui.workbench.renderers.swt
 Click Add Required Plug-ins and save
11/2/2010 12© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Create a Product Config (2)
 Open plugin.xml in the manifest editor
 Add property to the e4 Contacts product
 name appName
 Value e4 Contacts
 Add property to the e4 Contacts product
 name applicationXMI
 value
org.eclipse.e4.tutorial.contacts/Application.e4xmi
11/2/2010 13© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Resulting plugin.xml
<plugin>
<extension
id="product"
point="org.eclipse.core.runtime.products" >
<product
application="org.eclipse.e4.ui.workbench.swt.E4Application"
name="e4 Contacts" >
<property
name="appName"
value="e4 Contacts" >
</property>
<property
name="applicationXMI"
value="org.eclipse.e4.tutorial.contacts/Application.e4xmi" >
</property>
</product>
</extension>
</plugin>
11/2/2010 14© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 2: Launch empty e4 Contacts App
11/2/2010 15© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
Lab 3: Create a Handler
 Add two new dependencies in your project
 org.eclipse.e4.ui.workbench
 org.eclipse.e4.core.di
 Create the class ExitHandler in the package
org.eclipse.e4.tutorial.contacts.handlers
 Use the @Execute annotation
 Use the interface IWorkbench in the execute
method, it will be injected automatically
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 16
Lab 3: Add a Menu
 In the e4 WorkbenchModel editor add a Main
Menu to the Trimmed Window
 Give it the id menu:org.eclipse.ui.main.menu
 Expand the Main Menu and select Children
 Add a Menu with Label File
 Add a Direct MenuItem to the Menu
 Choose your ExitHandler the for the Class URI
and put Exit (Direct) in the Label field
 Save and launch the e4 contacts product
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 17
Lab 3: e4 Contacts with Menu
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 18
Lab 3: Use a Command (1)
 In the e4 WorkbenchModel editor select
Application/Commands
 Add a Command with
 Id contacts.exit
 Name Exit (Command)
 In the e4 WorkbenchModel editor select
Application/Handlers
 Add a Handler and use contacts.exit as
Command
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 19
Lab 3: Use a Command (2)
 In the e4 WorkbenchModel editor select
Trimmed Window/Main Menu/
Children/Menu/Children
 Add a HandledMenuItem to the Menu
 Use contacts.exit as Command
 Save and launch the e4 contacts product
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 20
Lab 3: e4 Contacts with 2 Menu Items
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 21
Lab 4: Add a List View (1)
 Import the projects
 org.eclipse.e4.tutorial.contacts.model
 org.eclipse.e4.tutorial.contacts.model.simple
 In your project org.eclipse.e4.tutorial.contacts
 Add dependencies
 org.eclipse.swt
 org.eclipse.jface
 org.eclipse.jface.databinding
 javax.inject
 org.eclipse.core.databinding
 org.eclipse.core.databinding.beans
 org.eclipse.e4.tutorial.contacts.model
 Create a class
org.eclipse.e4.tutorial.contacts.views.ListView
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 22
Lab 4: Add a List View (2)
 Copy the snippet “ListView.txt” into the body
of your List View class
 Add your List View as Part to the Workbench
Model
 Save all, then open your product configuration
and add all required plug-ins in the
dependencies
 Launch the application
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 23
Lab 4: e4 Contacts with List View
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 24
Lab 5: Add Sash and Part Stacks
 Add a PartSashContainer to the Trimmed
Window
 Use Horizontal orientation
 Add two Part Stacks to the Sash
 Move your List View Part to the first Part Stack
 Give the second Part Stack the id
org.eclipse.e4.tutorial.contacts.partstacks.second
 We need that later in the tutorial
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 25
Lab 5: Part Stacks and Sash
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 26
Lab 6: New Part as Model Fragment (1)
 Create a new bundle
org.eclipse.e4.tutorial.contacts.views.details
 Add the following dependencies:
 javax.inject
 org.eclipse.swt
 org.eclipse.core.databinding
 org.eclipse.core.databinding.beans
 org.eclipse.jface.databinding
 org.eclipse.e4.tutorial.contacts.model
 org.eclipse.e4.core.di
 org.eclipse.e4.ui.services
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 27
Lab 6: New Part as Model Fragment (2)
 Copy the file DetailsView.java into the src
folder of the new project
 Create a new folder xmi in the new project
 Create a New Model Fragment in the xmi
folder
 Add the DetailsView as Part to a new
String Model Fragment with id
org.eclipse.e4.tutorial.contacts.partstacks.second
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 28
Lab 6: New Part as Model Fragment (3)
 Create the extension for
org.eclipse.e4.workbench.model
 Tip: Uncheck “Show only extensions…”
 Remove email from your List View
 Add the bundle
org.eclipse.e4.tutorial.contacts.views.details
to your run configuration
 Save and launch
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 29
Lab 6: New Model Fragment
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 30
Lab 6: Add Selection
 React on selections in the ListView and
propagate them to the selection service
 Make the DetailsView reacting on the active
selection
 Launch and check if the selection mechanism
is working properly
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 31
Lab 6: Selection Provider
@Inject
private ESelectionService selectionService;
...
tableViewer
.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection =
(IStructuredSelection) event.getSelection();
selectionService.setSelection(selection.getFirstElement());
}
});
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 32
Lab 6: Selection User
@Inject
public void setSelection(
@Optional
@Named(IServiceConstants.ACTIVE_SELECTION)
IContact contact) {
if (contact != null) {
...
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 33
Lab 7: Add a CSS Theme
 Open the fragment.e4xmi in the model editor ad
set the part id to DetailsView
 This is used by the css: #DetailsView
 Add dependency to
org.eclipse.e4.ui.css.swt.theme
 In the ..contacts project, create a folder css
 Copy the file blue.css in the css folder
 Create a theme extension in the plugin.xml for
the blue theme
 Use this theme in the product extension
 Save and launch
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 34
Lab 7: e4 Contacts with blue Theme
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 35
License & Acknowledgements
 This work is licensed under the Creative Commons
Attribution-Noncommercial-No Derivative Works 3.0
Germany License
 See http://creativecommons.org/licenses/by-nc-
nd/3.0/de/deed.en_US
 Parts of the material are based on work of
Tom Schindl (http://www.bestsolution.at)
and Lars Vogel (www.vogella.de)
11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 36

Weitere ähnliche Inhalte

Was ist angesagt?

Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Sentinel Solutions Ltd
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas8neutron8
 
Class notes(week 10) on applet programming
Class notes(week 10) on applet programmingClass notes(week 10) on applet programming
Class notes(week 10) on applet programmingKuntal Bhowmick
 
Eo gaddis java_chapter_13_5e
Eo gaddis java_chapter_13_5eEo gaddis java_chapter_13_5e
Eo gaddis java_chapter_13_5eGina Bullock
 
Eo gaddis java_chapter_11_5e
Eo gaddis java_chapter_11_5eEo gaddis java_chapter_11_5e
Eo gaddis java_chapter_11_5eGina Bullock
 

Was ist angesagt? (6)

Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]Titanium Studio [Updated - 18/12/2011]
Titanium Studio [Updated - 18/12/2011]
 
Mobile os by waqas
Mobile os by waqasMobile os by waqas
Mobile os by waqas
 
Class notes(week 10) on applet programming
Class notes(week 10) on applet programmingClass notes(week 10) on applet programming
Class notes(week 10) on applet programming
 
Eo gaddis java_chapter_13_5e
Eo gaddis java_chapter_13_5eEo gaddis java_chapter_13_5e
Eo gaddis java_chapter_13_5e
 
MD51 Lab Manual
MD51 Lab ManualMD51 Lab Manual
MD51 Lab Manual
 
Eo gaddis java_chapter_11_5e
Eo gaddis java_chapter_11_5eEo gaddis java_chapter_11_5e
Eo gaddis java_chapter_11_5e
 

Andere mochten auch

Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Lars Vogel
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?Lars Vogel
 
Programming Android
Programming AndroidProgramming Android
Programming AndroidLars Vogel
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684quadrocopter
 
Application Of Derivative In Real Life.
Application Of Derivative In Real Life.Application Of Derivative In Real Life.
Application Of Derivative In Real Life.Afnanul Hassan
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivativesdivaprincess09
 
Applications of Derivatives
Applications of DerivativesApplications of Derivatives
Applications of DerivativesIram Khan
 

Andere mochten auch (14)

Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)Android Overview (Karlsruhe VKSI)
Android Overview (Karlsruhe VKSI)
 
What is so cool about Android 4.0?
What is so cool about Android 4.0?What is so cool about Android 4.0?
What is so cool about Android 4.0?
 
Programming Android
Programming AndroidProgramming Android
Programming Android
 
Pid En Un Pic16 F684
Pid En Un Pic16 F684Pid En Un Pic16 F684
Pid En Un Pic16 F684
 
Btl2
Btl2Btl2
Btl2
 
Option_Greeks
Option_GreeksOption_Greeks
Option_Greeks
 
Application of Derivative 5
Application of Derivative 5Application of Derivative 5
Application of Derivative 5
 
Application of Derivative 3
Application of Derivative 3Application of Derivative 3
Application of Derivative 3
 
Application of Derivative 1
Application of Derivative 1Application of Derivative 1
Application of Derivative 1
 
Application Of Derivative In Real Life.
Application Of Derivative In Real Life.Application Of Derivative In Real Life.
Application Of Derivative In Real Life.
 
The Application of Derivatives
The Application of DerivativesThe Application of Derivatives
The Application of Derivatives
 
Applications of Derivatives
Applications of DerivativesApplications of Derivatives
Applications of Derivatives
 

Ähnlich wie Rich Clients with Eclipse 4.0: Create a List View

Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Lars Vogel
 
Developing Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformDeveloping Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformKai Tödter
 
Android coding guide lines
Android coding guide linesAndroid coding guide lines
Android coding guide lineslokeshG38
 
CSS Styling for Eclipse RCP 3.x and 4.x
CSS Styling for Eclipse RCP 3.x and 4.xCSS Styling for Eclipse RCP 3.x and 4.x
CSS Styling for Eclipse RCP 3.x and 4.xKai Tödter
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012jsievers
 
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureEclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureTonny Madsen
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open SourceAxway Appcelerator
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium TutorialKevin Whinnery
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0sanket1996
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvcbgrynko
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1Shyamala Prayaga
 
Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build TechnologyPhilip Johnson
 
Module 2: C# 3.0 Language Enhancements (Material)
Module 2: C# 3.0 Language Enhancements (Material)Module 2: C# 3.0 Language Enhancements (Material)
Module 2: C# 3.0 Language Enhancements (Material)Mohamed Saleh
 
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Codemotion
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworksphanleson
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...Niklas Heidloff
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Mikkel Flindt Heisterberg
 

Ähnlich wie Rich Clients with Eclipse 4.0: Create a List View (20)

Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010Eclipse e4 Tutorial - EclipseCon 2010
Eclipse e4 Tutorial - EclipseCon 2010
 
Developing Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application PlatformDeveloping Rich Clients with the Eclipse 4 Application Platform
Developing Rich Clients with the Eclipse 4 Application Platform
 
Android coding guide lines
Android coding guide linesAndroid coding guide lines
Android coding guide lines
 
CSS Styling for Eclipse RCP 3.x and 4.x
CSS Styling for Eclipse RCP 3.x and 4.xCSS Styling for Eclipse RCP 3.x and 4.x
CSS Styling for Eclipse RCP 3.x and 4.x
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
 
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureEclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Asp net mvc
Asp net mvcAsp net mvc
Asp net mvc
 
iPhone application development training day 1
iPhone application development training day 1iPhone application development training day 1
iPhone application development training day 1
 
Introduction to Software Build Technology
Introduction to Software Build TechnologyIntroduction to Software Build Technology
Introduction to Software Build Technology
 
Module 2: C# 3.0 Language Enhancements (Material)
Module 2: C# 3.0 Language Enhancements (Material)Module 2: C# 3.0 Language Enhancements (Material)
Module 2: C# 3.0 Language Enhancements (Material)
 
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
 
Exploit Frameworks
Exploit FrameworksExploit Frameworks
Exploit Frameworks
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
OpenNTF Webinar 05/07/13: OpenNTF - The IBM Collaboration Solutions App Dev C...
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)Plug yourself in and your app will never be the same (1 hr edition)
Plug yourself in and your app will never be the same (1 hr edition)
 

Mehr von Lars Vogel

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Lars Vogel
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectLars Vogel
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views Lars Vogel
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDELars Vogel
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in AndroidLars Vogel
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0Lars Vogel
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayLars Vogel
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceLars Vogel
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Lars Vogel
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsLars Vogel
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineLars Vogel
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Lars Vogel
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Lars Vogel
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugLars Vogel
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Lars Vogel
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview Lars Vogel
 
Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Lars Vogel
 

Mehr von Lars Vogel (20)

Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020Eclipse IDE and Platform news on Fosdem 2020
Eclipse IDE and Platform news on Fosdem 2020
 
Eclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source projectEclipse platform news and how to contribute to the Eclipse Open Source project
Eclipse platform news and how to contribute to the Eclipse Open Source project
 
Android design and Custom views
Android design and Custom views Android design and Custom views
Android design and Custom views
 
How to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDEHow to become an Eclipse committer in 20 minutes and fork the IDE
How to become an Eclipse committer in 20 minutes and fork the IDE
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in Android
 
What is so cool about Android 4.0
What is so cool about Android 4.0What is so cool about Android 4.0
What is so cool about Android 4.0
 
Eclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse DayEclipse e4 - Google Eclipse Day
Eclipse e4 - Google Eclipse Day
 
Android C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen ConferenceAndroid C2DM Presentation at O'Reilly AndroidOpen Conference
Android C2DM Presentation at O'Reilly AndroidOpen Conference
 
Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11 Android Introduction on Java Forum Stuttgart 11
Android Introduction on Java Forum Stuttgart 11
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot Topics
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Android Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App EngineAndroid Cloud to Device Messaging with the Google App Engine
Android Cloud to Device Messaging with the Google App Engine
 
Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models Eclipse 4.0 - Dynamic Models
Eclipse 4.0 - Dynamic Models
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J) Google App Engine for Java (GAE/J)
Google App Engine for Java (GAE/J)
 

Kürzlich hochgeladen

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Kürzlich hochgeladen (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Rich Clients with Eclipse 4.0: Create a List View

  • 1. Rich Clients with Eclipse 4.0 Kai Tödter Siemens Corporate Technology 11/2/2010 1© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. The Labs
  • 2. Labs  Lab 1: Generate “Hello, e4”  Lab 2: Manual Application Creation  Lab 3: Handlers & Command  Lab 4: List View  Lab 5: PartStacks & Sash  Lab 6: New Model Fragment  Lab 7: CSS Theming 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 2
  • 3. Lab 1: Generate “Hello, e4”  Start the SDK  Select New/Other…/e4/e4 Application Project  Name the project org.eclipse.e4.tutorial.hello  Click “Next”  Change property Name to Hello e4  Change property Provider to your name  Click “Finish” 11/2/2010 3© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 4. Lab 1: Launch “Hello, e4”  Double-Click org.e4-tutorial.hello.product  Click on “Launch an Eclipse Application” in the Testing section  If the launch fails, don’t worry…  Open your org.e4-tutorial.hello.product launch configuration, select the Plug-ins tab and add all required plug-ins  Launch again, this should work!  Play around with the application 11/2/2010 4© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 5. Lab 2: Manual Application Creation  Create a Plug-in Project org.eclipse.e4.tutorial.contacts  Add a Product Extension  Create a minimal Workbench Model  Create a Product Configuration  Launch the application 11/2/2010 5© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 6. Lab 2: Create a Plug-in Project  On the first wizard page  Name the project org.eclipse.e4.tutorial.contacts  Select Equinox as target platform  On the second wizard page  Change the Name property to e4 Contacts  Put your name as Provider  Uncheck Generate an Activator  Click Finish  Now your project is created 11/2/2010 6© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 7. Lab 2: Create a Product Definition (1)  Open the file META-INF/MANIFEST.MF  Click on Extensions in the Overview tab  This makes the Extensions tab visible if hidden  Add a dependency to org.eclipse.equinox.app  Save (Press CTRL s)  Select the Extensions tab and add the extension point org.eclipse.core.runtime.products  Make sure to put product in the ID field 11/2/2010 7© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 8. Lab 2: Create a Product Definition (2)  Add a product to the …products extension  In the application field, put org.eclipse.e4.ui.workbench.swt.E4Application  Use e4 Contacts as product name 11/2/2010 8© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 9. Lab 2: Minimal Workbench Model  Select menu New/Other…/e4/Model/New Application Model  Put /org.eclipse.e4.tutorial.contacts as Container  Click Finish, then the Application.e4xmi will be opened in the e4 WorkbenchModel editor  In the editor, click Window in the left area and select Trimmed Window in the right area  Click on the icon next to Trimmed Window  Set Width to 800 ,Height to 600 and Label to e4 Contacts 11/2/2010 9© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 10. Lab 2: Workbench Model Editor 11/2/2010 10© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 11. Lab 2: Resulting Application.e4xmi <?xml version="1.0" encoding="ASCII"?> <application:Application xmi:version= "2.0" xmlns:xmi= "http://www.omg.org/XMI" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:application= "http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic= "http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmi:id= "_PXE0EJ-qEd-iBNJWVQ-d9Q" elementId= "org.eclipse.e4.tutorial.contacts.application" > <children xsi:type= "basic:TrimmedWindow" xmi:id= "_eB6zsJ-xEd-iBNJWVQ-d9Q" label= "e4 Contacts" width= "800" height= "600" /> </application:Application> 11/2/2010 11© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 12. Lab 2: Create a Product Config (1)  Create a product configuration  Name it contacts  Choose Use an existing product: org.eclipse.e4.tutorial.contacts.product  Click Finish  Add dependencies  org.eclipse.equinox.ds  org.eclipse.equinox.event  org.eclipse.e4.ui.workbench.renderers.swt  Click Add Required Plug-ins and save 11/2/2010 12© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 13. Lab 2: Create a Product Config (2)  Open plugin.xml in the manifest editor  Add property to the e4 Contacts product  name appName  Value e4 Contacts  Add property to the e4 Contacts product  name applicationXMI  value org.eclipse.e4.tutorial.contacts/Application.e4xmi 11/2/2010 13© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 14. Lab 2: Resulting plugin.xml <plugin> <extension id="product" point="org.eclipse.core.runtime.products" > <product application="org.eclipse.e4.ui.workbench.swt.E4Application" name="e4 Contacts" > <property name="appName" value="e4 Contacts" > </property> <property name="applicationXMI" value="org.eclipse.e4.tutorial.contacts/Application.e4xmi" > </property> </product> </extension> </plugin> 11/2/2010 14© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 15. Lab 2: Launch empty e4 Contacts App 11/2/2010 15© Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License.
  • 16. Lab 3: Create a Handler  Add two new dependencies in your project  org.eclipse.e4.ui.workbench  org.eclipse.e4.core.di  Create the class ExitHandler in the package org.eclipse.e4.tutorial.contacts.handlers  Use the @Execute annotation  Use the interface IWorkbench in the execute method, it will be injected automatically 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 16
  • 17. Lab 3: Add a Menu  In the e4 WorkbenchModel editor add a Main Menu to the Trimmed Window  Give it the id menu:org.eclipse.ui.main.menu  Expand the Main Menu and select Children  Add a Menu with Label File  Add a Direct MenuItem to the Menu  Choose your ExitHandler the for the Class URI and put Exit (Direct) in the Label field  Save and launch the e4 contacts product 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 17
  • 18. Lab 3: e4 Contacts with Menu 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 18
  • 19. Lab 3: Use a Command (1)  In the e4 WorkbenchModel editor select Application/Commands  Add a Command with  Id contacts.exit  Name Exit (Command)  In the e4 WorkbenchModel editor select Application/Handlers  Add a Handler and use contacts.exit as Command 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 19
  • 20. Lab 3: Use a Command (2)  In the e4 WorkbenchModel editor select Trimmed Window/Main Menu/ Children/Menu/Children  Add a HandledMenuItem to the Menu  Use contacts.exit as Command  Save and launch the e4 contacts product 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 20
  • 21. Lab 3: e4 Contacts with 2 Menu Items 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 21
  • 22. Lab 4: Add a List View (1)  Import the projects  org.eclipse.e4.tutorial.contacts.model  org.eclipse.e4.tutorial.contacts.model.simple  In your project org.eclipse.e4.tutorial.contacts  Add dependencies  org.eclipse.swt  org.eclipse.jface  org.eclipse.jface.databinding  javax.inject  org.eclipse.core.databinding  org.eclipse.core.databinding.beans  org.eclipse.e4.tutorial.contacts.model  Create a class org.eclipse.e4.tutorial.contacts.views.ListView 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 22
  • 23. Lab 4: Add a List View (2)  Copy the snippet “ListView.txt” into the body of your List View class  Add your List View as Part to the Workbench Model  Save all, then open your product configuration and add all required plug-ins in the dependencies  Launch the application 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 23
  • 24. Lab 4: e4 Contacts with List View 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 24
  • 25. Lab 5: Add Sash and Part Stacks  Add a PartSashContainer to the Trimmed Window  Use Horizontal orientation  Add two Part Stacks to the Sash  Move your List View Part to the first Part Stack  Give the second Part Stack the id org.eclipse.e4.tutorial.contacts.partstacks.second  We need that later in the tutorial 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 25
  • 26. Lab 5: Part Stacks and Sash 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 26
  • 27. Lab 6: New Part as Model Fragment (1)  Create a new bundle org.eclipse.e4.tutorial.contacts.views.details  Add the following dependencies:  javax.inject  org.eclipse.swt  org.eclipse.core.databinding  org.eclipse.core.databinding.beans  org.eclipse.jface.databinding  org.eclipse.e4.tutorial.contacts.model  org.eclipse.e4.core.di  org.eclipse.e4.ui.services 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 27
  • 28. Lab 6: New Part as Model Fragment (2)  Copy the file DetailsView.java into the src folder of the new project  Create a new folder xmi in the new project  Create a New Model Fragment in the xmi folder  Add the DetailsView as Part to a new String Model Fragment with id org.eclipse.e4.tutorial.contacts.partstacks.second 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 28
  • 29. Lab 6: New Part as Model Fragment (3)  Create the extension for org.eclipse.e4.workbench.model  Tip: Uncheck “Show only extensions…”  Remove email from your List View  Add the bundle org.eclipse.e4.tutorial.contacts.views.details to your run configuration  Save and launch 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 29
  • 30. Lab 6: New Model Fragment 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 30
  • 31. Lab 6: Add Selection  React on selections in the ListView and propagate them to the selection service  Make the DetailsView reacting on the active selection  Launch and check if the selection mechanism is working properly 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 31
  • 32. Lab 6: Selection Provider @Inject private ESelectionService selectionService; ... tableViewer .addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); selectionService.setSelection(selection.getFirstElement()); } }); 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 32
  • 33. Lab 6: Selection User @Inject public void setSelection( @Optional @Named(IServiceConstants.ACTIVE_SELECTION) IContact contact) { if (contact != null) { ... 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 33
  • 34. Lab 7: Add a CSS Theme  Open the fragment.e4xmi in the model editor ad set the part id to DetailsView  This is used by the css: #DetailsView  Add dependency to org.eclipse.e4.ui.css.swt.theme  In the ..contacts project, create a folder css  Copy the file blue.css in the css folder  Create a theme extension in the plugin.xml for the blue theme  Use this theme in the product extension  Save and launch 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 34
  • 35. Lab 7: e4 Contacts with blue Theme 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 35
  • 36. License & Acknowledgements  This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License  See http://creativecommons.org/licenses/by-nc- nd/3.0/de/deed.en_US  Parts of the material are based on work of Tom Schindl (http://www.bestsolution.at) and Lars Vogel (www.vogella.de) 11/2/2010 © Kai Tödter and others, Licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Germany License. 36