Eclipse Plug-ins
and RCP
Training Course
RCP and Industrialization
October 2013Copyright © 2013 Luca D’Onofrio – RCP Solut...
1. Internationalization (I18N)
2. Building RCPs
a) RCP startup classes
b) Product Configuration and Branding
c) Features a...
∗ Eclipse and the underlying JRE (Java Runtime
Environment) provide APIs for separating language
and UI human readable str...
∗ Internationalize plug-in manifest:
∗ PDE Tools Internationalize/Externalize Strings
∗ Extract strings and create fragme...
∗ Define the application which you would like to run using the
platform runtime.
∗ Declared applications can be run direct...
∗ IApplication
∗ Start/stop
∗ WorkbenchAdvisor
∗ Initialize
∗ Performs arbitrary actions just
before the first workbench w...
∗ Products are the Eclipse unit of branding.
∗ A Product defines the default application to run when running
the product.
...
∗ An Eclipse based product is a stand-alone program built with the Eclipse
platform.
∗ A product may optionally be package...
Product Configuration and
Branding (3/3)
October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions
9
∗ Product Branding:...
∗ A Feature groups together one or more plug-ins
∗ A Feature can be deployed as an installation
unit.
∗ A Feature specifie...
Features and Branding
(2/3)
Copyright © 2013 Luca D’Onofrio – RCP Solutions
11
October 2013
∗ Contains:
∗ about.ini
∗aboutText: short multi-line description of the
feature
∗featureImage: 32x32 pixel image used in t...
∗ More features can be collected in an update site described by a
site.xml file.
∗ An update site contains:
∗ Features cat...
∗ Package those elements to be delivered to the customer in a
form suitable for the installation.
∗ Automated build using ...
Target Platform
October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions
15
∗ The Target Platform refers to the
plug-in...
∗ Eclipse package containing all the needed plugins to export your
RCP product to different platforms (Windows, Linux, Mac...
∗ The p2 project is a sub-project of Equinox (OSGI
services) that focuses on provisioning technology for
OSGi-based applic...
∗ www.eclipse.org
∗ help.eclipse.org
∗ wiki.eclipse.org
∗ Eclipse SDK update site
∗ http://download.eclipse.org/eclipse/up...
Upcoming SlideShare
Loading in …5
×

Eclipse Training - RCP & Industrialization

466
-1

Published on

Eclipse Training - RCP & Industrialization

Example code available at: https://code.google.com/p/eclipse-training-course/

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
466
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Eclipse Training - RCP & Industrialization

  1. 1. Eclipse Plug-ins and RCP Training Course RCP and Industrialization October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 1
  2. 2. 1. Internationalization (I18N) 2. Building RCPs a) RCP startup classes b) Product Configuration and Branding c) Features and Branding d) Update Site e) Building a Product f) Target Platform and Delta Packs g) P2 Repository Agenda October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 2
  3. 3. ∗ Eclipse and the underlying JRE (Java Runtime Environment) provide APIs for separating language and UI human readable strings from code. ∗ By isolating those strings an application can be «localized» ∗ Main Concepts: ∗ Property files containing the strings collected by language ∗ APIs or tools create/access string properties Internationalization (I18N) (1/2) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 3
  4. 4. ∗ Internationalize plug-in manifest: ∗ PDE Tools Internationalize/Externalize Strings ∗ Extract strings and create fragments for each selected language (see ISO 639, ISO 3166) bundle_<language>_<country>.properties ∗ Externalize plugin-in strings: ∗ SourceExternalize Strings ∗ A property(ies) file(s) contains the set strings ∗ An accessor class(es) extending org.eclipse.osgi.util.NLS provides mechanisms to load and access property file according to environment locale <basename>_<language>_<country>.properties TIP: factor any common values and create a common key. TIP: use in your code «Name»+ «:» instead of «Name:» Internationalization (I18N) (2/2) Copyright © 2013 Luca D’Onofrio – RCP Solutions 4 October 2013
  5. 5. ∗ Define the application which you would like to run using the platform runtime. ∗ Declared applications can be run directly from the main platform launcher by specifying the application argument where the parameter is the id of an extension supplied to the applications extension point. ∗ This application is instantiated and run by the platform. ∗ An IApplication represent executable entry points. Building RCPs Extension points and APIs (1/2) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 5 Purpose Define the application entry point. Package org.eclipse.core.runtime Extension Point org.eclipse.core.runtime.applications Interface(s) org.eclipse.equinox.app.IApplication
  6. 6. ∗ IApplication ∗ Start/stop ∗ WorkbenchAdvisor ∗ Initialize ∗ Performs arbitrary actions just before the first workbench window is opened (or restored) / closed ∗ WorkbenchWindowAdvisor ∗ Performs arbitrary actions before the window is opened/closed ∗ ActionBarAdvisor ∗ Configure menu, action bar, status bar, … Building RCPs Extension points and APIs (2/2) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 6 class rcp ActionBarAdvisor ApplicationActionBarAdvisor WorkbenchAdvisor ApplicationWorkbenchAdvisor WorkbenchWindowAdvisor ApplicationWorkbenchWindowAdvisor IApplication TrainingApplication Enry Point Configure the Workbench Configure action bar and menu of a workcench window. Configure the workbench window.
  7. 7. ∗ Products are the Eclipse unit of branding. ∗ A Product defines the default application to run when running the product. ∗ There are two possible forms of product extension ∗ Static product extensions directly contain all relevant information about the product. ∗ Dynamic product extensions identify a class (an IProductProvider) which is capable of defining one or more products when queried. Product Configuration and Branding (1/3) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 7 Purpose Define the product application to launch and its branding. Package org.eclipse.core.runtime Extension Point org.eclipse.core.runtime.products
  8. 8. ∗ An Eclipse based product is a stand-alone program built with the Eclipse platform. ∗ A product may optionally be packaged and delivered as one or more features, which are simply groupings of plug-ins that are managed as a single entity by the Eclipse update mechanisms. ∗ Products include all the code and plug-ins needed to run them. This includes a Java runtime environment (JRE) and the Eclipse platform code. ∗ Once installed, the user launches the product and is presented with an Eclipse workbench configured specifically for the purpose supported by the product. ∗ The platform makes it easy to configure labels, about dialogs, graphics, and splash screens. ∗ PDE provides a product configuration file and associated editor to make it easy to create products in the correct format. Product Configuration and Branding (2/3) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 8
  9. 9. Product Configuration and Branding (3/3) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 9 ∗ Product Branding: ∗ Splash screen ∗ About dialog image and text ∗ Windows Images (and icons associated to the launcher)
  10. 10. ∗ A Feature groups together one or more plug-ins ∗ A Feature can be deployed as an installation unit. ∗ A Feature specifies: ∗ Category (optional) ∗ Branding plugin (optional) ∗ Feature update site URL (optional) ∗ Licence, copyright, … information ∗ Dependencies Features and Branding (1/3) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 10
  11. 11. Features and Branding (2/3) Copyright © 2013 Luca D’Onofrio – RCP Solutions 11 October 2013
  12. 12. ∗ Contains: ∗ about.ini ∗aboutText: short multi-line description of the feature ∗featureImage: 32x32 pixel image used in the product About dialog Features and Branding Branding Plugin (3/3) October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 12
  13. 13. ∗ More features can be collected in an update site described by a site.xml file. ∗ An update site contains: ∗ Features categories ∗ Features ∗ Web page(s) (optional) ∗ Feature/Update site exported packages can be installed using Eclipse installation wizard ∗ Installed Features can be uninstalled using the Eclipse About dialog Update Site October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 13
  14. 14. ∗ Package those elements to be delivered to the customer in a form suitable for the installation. ∗ Automated build using PDE ∗ Customized build using ANT script file Building a Product October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 14
  15. 15. Target Platform October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 15 ∗ The Target Platform refers to the plug-ins which your workspace will be built and run against. It describes the platform that you are developing for. ∗ The Target Definition Editor is used to edit target definition files in the workspace, which should end with the extension ".target". ∗ Target definition files can be created using the New Target Definition Wizard or by moving them to the workspace on the Target Platform Preference Page.
  16. 16. ∗ Eclipse package containing all the needed plugins to export your RCP product to different platforms (Windows, Linux, Mac, …) without having to use a platform’s native Eclipse installation. ∗ The archives contains all the platform specific fragments from the Eclipse SDK. ∗ Delta pack can be installed using: WindowPreferencesPlug-in DevelopmentTarget Platform Delta Packs October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 16
  17. 17. ∗ The p2 project is a sub-project of Equinox (OSGI services) that focuses on provisioning technology for OSGi-based applications. ∗ It provides Eclipse with installation facilities. ∗ In order to use P2 you need to add org.eclipse.equinox.p2.* packages in your installation unit. ∗ An installable unit can be augmented at generation time by writing a p2 advice file (p2.inf). The format of this file is java properties file containing key=value pairs. P2 Repository October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 17
  18. 18. ∗ www.eclipse.org ∗ help.eclipse.org ∗ wiki.eclipse.org ∗ Eclipse SDK update site ∗ http://download.eclipse.org/eclipse/updates/4.3 ∗ www.eclipse.org/equinox/ ∗ http://wiki.eclipse.org/Equinox_Provisioning References October 2013Copyright © 2013 Luca D’Onofrio – RCP Solutions 18
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×