Skip to main content
Jump to: navigation, search

Rich Client Platform/FAQ

< Rich Client Platform
Revision as of 15:42, 9 December 2005 by Nick (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Eclipse Rich Client Platform FAQ

The following are Frequently Asked Questions (FAQs) about the Eclipse Rich Client Platform. For relevant tutorials, help topics, newsgroups, examples, and other resources, see the main RCP page.

What is the Eclipse Rich Client Platform?

While the Eclipse platform is designed to serve as an open tools platform, it is architected so that its components could be used to build just about any client application. The minimal set of plug-ins needed to build a rich client application is collectively known as the Rich Client Platform.
For more details, see the main RCP page.
Also note that Part 1 of the original Eclipse whitepaper also applies, and is a good high-level overview of what is available in the Rich Client Platform. Although it speaks of the Eclipse IDE (which is itself an RCP application), almost all of the functionality described in Part 1 is available in the RCP. Exceptions are the Workspace model and Team support, which are components in the IDE, not the RCP. Part 2's discussion of JDT is specific to the Eclipse IDE, however it is a good illustration of how an application would be structured on top of the RCP.</p>

What is included in the Rich Client Platform?

The Eclipse Rich Client Platform consists of the following components:
<tbody> </tbody>
Eclipse Runtime
Provides the foundational support for plug-ins, extension points and

extensions (among other facilities).  The Eclipse runtime is built on top of the <a href="">OSGi framework</a>.


<a href="">Platform Core home page</a>

Dev guide: <a href="">Runtime overview</a>
Article: <a href="">Notes

     on the Eclipse Plug-in Architecture</a>
The Standard Widget Toolkit. SWT is designed to provide

efficient, portable access to the user-interface facilities of the operating systems on which it is implemented


+ platform-specific fragments

<a href="">Platform SWT home page</a>

Dev guide: <a href="">SWT</a>

         <a href="">Getting Started</a>
<a href="">SWT FAQ</a>
<a href="">SWT code snippets</a>
<a href="">SWT Articles</a>
A UI framework, layered on top of SWT, for handling many common UI
     programming tasks.
org.eclipse.jface <a href="">Platform UI home page</a>

Dev guide: <a href="">JFace</a>

         <a href="">Workbench and JFace Articles</a>
Workbench The Workbench builds on top of the Runtime, SWT and JFace to provide a highly

scalable, open-ended, multi-window environment for managing views, editors, perspectives (task-oriented layouts), actions, wizards, preference pages, and more.
The Workbench is sometimes called the Generc Workbench, to distinguish it from the IDE Workbench facilities defined in the org.eclipse.ui.ide plug-in.



<a href="">Platform UI home page</a>

Dev guide: <a href="">Plugging into the workbench</a>,<a href=""> Dialogs and wizards</a>, <a href="">Advanced workbench concepts</a>

         <a href="">Workbench and JFace Articles</a>

Other prerequisites for the Workbench

Support for XML expressions language, and help core content model.

<div id="footprint"/>

What is the disk footprint for the Rich Client Platform?

As of Eclipse 3.1.1, the combined disk footprint for the Rich Client

Platform, including the above plug-ins, startup.jar and the eclipse.exe executable, is about 6.6 Meg.


<a name="resourcesPlugin">Q: Is the resources plug-in (org.eclipse.core.resources) considered part of the Rich Client Platform?</a>

No. The workspace resource model provided by the org.eclipse.core.resources plug-in is not considered part of the Rich Client Platform. While this is the underlying data model for the Eclipse IDE, the RCP makes no assumptions about the underlying data model of the application being built. The data model could just as well be files in the local filesystem, a remote database, an RDF data store, or anything else. If it makes sense for the application, org.eclipse.core.resources can be included and used as the application's data model, but this is not required. Much effort was put into Eclipse 3.0 to remove the dependencies on org.eclipse.core.resources from the generic workbench. Any resource dependencies (for example, the New Project, Folder and File wizards, and the Resource Navigator, Tasks and Problems views), were considered IDE-specific and factored out into the IDE plugin (org.eclipse.ui.ide).

<a name="idePlugin">Q: Is the IDE plug-in (org.eclipse.ui.ide) considered part of the Rich Client Platform?</a>

No. The org.eclipse.ui.ide plug-in is layered on top of the generic workbench (org.eclipse.ui) and defines the application for the Eclipse IDE, on top of which sit the other IDE components such as the Java Development Tools (JDT), Plug-in Development Environment (PDE), Debugger, and Team support. The IDE instantiates the generic workbench, configuring it with IDE-specific menu and toolbar items, and adding IDE-specific views, preference pages and other extensions. The IDE uses the workspace resource model as its underlying data model.

The org.eclipse.ui.ide plug-in, and the extensions defined within it, are not designed to be reused in other RCP applications.

<a name="otherComponents">Q: What other Eclipse components can be used in constructing RCP applications?</a>

Here is a list of some of the reusable components in the broader Eclipse codebase that can be incorporated into RCP applications.

<tbody> </tbody>
Web-app-based Help UI, with support for dynamic content.

<a href="">Platform Help home page</a>

Dev guide: <a href="">Plugging in help</a>

Update Manager
Allows users to discover and install updated versions of products and extensions.



+ platform-specific fragments

<a href="">Platform Update home page</a>

Dev guide: <a href="">Updating a product or extension</a>

Framework for building high-function text editors.
<a href="">Platform Text home page</a>

Dev guide: <a href="">Text editors and platform text</a>

Forms-based control library and editor framework.
org.eclipse.ui.forms <a href="">Eclipse Forms Programming Guide (draft)</a>
Welcome Page (aka Intro) Initial welcome experience and guided assistance.
Dev guide: <a href="">Intro support</a>
Cheat Sheets
A Cheat Sheet guides the user through a long-running, multi-step task.
Dev guide: <a href="">Cheat Sheets</a>
Workspace resource model, with managed projects, folders and files.
<a href="">Platform Core home page</a>
Dev guide: <a href="">Resources overview</a>
Console Extensible console view.
Javadoc: <a href="">org.eclipse.ui.console</a>, <a href="">org.eclipse.ui.console.actions</a>
Outline and Properties views Outline and Properties views
Graphical Editing Framework (GEF) Framework for building graphical editors. Includes Draw2D, a vector graphics framework.


<a href="">GEF home page</a>
     <a href="">Overview</a>, <a href="">FAQ</a>
Eclipse Modeling Framework (EMF) and Service Data Objects (SDO) EMF

is a modeling framework and code generation facility for building tools and other applications based on a structured data model.  SDO is a framework that simplifies and unifies data application

development in a service oriented arcecture (SOA).
<a href="">EMF plug-in list from CVS</a>
<a href="">EMF home page</a>

Overviews: <a class="subcategory" href="">EMF</a>,

<a class="subcategory" href="">EMF.Edit</a>, <a class="subcategory" href="">SDO</a>

<a name="gettingStarted">Q: How do I get started with RCP?</a>

The <a href="index.html#tutorials">tutorials by Ed Burnette and Jeff Gunther</a> are good starting points. See also the <a href="index.html#rcp_browser">browser example</a> and the <a href="index.html#help">suggested help topics</a>.

<a name="newLook"></a><a name="r21pres">Q: Will an RCP application inherit the Eclipse IDE look?</a>

By default, RCP apps use the same presentation as the IDE, but with different defaults (e.g. tabs are "traditional"). However, other presentation implementations are available. For example, the R2.1 presentation available in the IDE can also be used by RCP apps; it is provided in the org.eclipse.ui.presentations.r21 plug-in. For instructions on how to deploy the R2.1 presentation, see <a href="index.html#rcp_and_r21">this example</a>.

The default presentation of views and editors, and the overall window layout, is also configurable in several ways. See the following entries for more details.

<a name="windowImage">Q: How can I change the window icon in my application?</a>

<a href="">Define a product</a> via the <a href="">products extension point</a> and specify the windowImages property to refer to two image files, a 16x16 one and a 32x32 one.

It is best to specify both, since a 16x16 icon is typically used in the window trim, and a 32x32 icon is typically used in the OS's application switcher (e.g. Alt+Tab on Windows). If only one is specified, it is scaled up or down as needed, which can result in poor quality.

For example, the <a href="index.html#rcp_browser">browser example</a> has the following in its plugin.xml:

   <extension<br>         point="org.eclipse.core.runtime.products"<br>         id="product"><br>      <product<br>            name="%productName"<br>            application=""><br>         <property<br>               name="windowImages"<br>               value="icons/eclipse.gif,icons/eclipse32.gif"/><br>         ...<br>   </extension><br>  

For more details, see the <a href="">Branding Your Application</a> article.

<a name="customPrefs">Q: How can I change the default UI settings for the perspective bar location, fast view bar location, etc?</a>

Several UI settings such as the perspective bar location, fast view bar location, traditional vs. curvy tabs, etc., are controlled by preferences on the UI plug-in. These have default values defined by the generic workbench. However, the product can override these default values using the product preference customization mechanism.

<a href="">Define a product</a> via the <a href="">products extension point</a> and add the following property:

         <property<br>               name="preferenceCustomization"<br>               value="plugin_customization.ini"/><br>	

Then create a file called plugin_customization.ini, in the same directory as the plugin.xml file, with contents of the form:


For example, to show the perspective bar and fast view bar on the left, and to use curvy tabs, add the following to the plugin_customization.ini file:

	org.eclipse.ui/DOCK_PERSPECTIVE_BAR=left<br>	org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false<br>	org.eclipse.ui/initialFastViewBarLocation=left<br>	org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false<br>    

For a list of public preferences available on the UI plug-in and their valid values, see the interface <a href="">org.eclipse.ui.IWorkbenchPreferenceConstants</a>.

For more details, see the <a href="">Branding Your Application</a> article and the <a href="">Customizing a product</a> section in Help.

<a name="actionSetOrder">Q: How can I get action set menus to appear in the right order, between my app's main menus?</a>

When adding main menus to the menu manager in your WorkbenchAdvisor's fillActionBars method, add an "additions" group marker where you'd like action sets to appear.

menuBar.add(fileMenu);<br>menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));<br>menuBar.add(helpMenu);
<a name="multiViews">Q: Can multiple instances of the same view be made to appear at the same time?</a>

Yes. See IWorkbenchPage.showView(String primaryId, String secondaryId, int mode). The <view> element in the plugin.xml must also specify allowMultiple="true". Be sure to use a different secondaryId for each instance, otherwise showView will find any existing view with the same primaryId and secondaryId rather than showing a new one. To pass instance-specific data to the view, you will need to cast the resulting IViewPart down to the concrete view class and call your own setData method. </view>

Note that views with a secondaryId will not match placeholders specifying just the primaryId. In a perspective factory, placeholders can be added for multi-instance views using the format <cocde>primaryId + ':' + secondaryId, where '*' wildcards are supported. </cocde>

<a name="deployment">Q: How can I deploy my RCP app?</a>

<a href="index.html#tutorials">Part 1 of Ed Burnette's RCP tutorial</a> discusses this in the section entitled Running it outside of Eclipse.

There is ongoing work in Eclipse 3.1 to develop a <A HREF="">deployment wizard</A> to simplify this process.

<a name="troubleshooting">Q:

When I try running, nothing happens, or it complains that the application could not be found in the registry, or that other plug-ins are missing. How can I track the problem down?</a>


Try running first from within Eclipse using the Runtime Workbench (3.0 and 3.0.1) or Eclipse Application (3.1) launch configuration (Run > Debug...). Ensure that the application's plug-in(s) and all its prerequisites are selected in the Plug-ins tab. The easiest way is to select "Choose plug-ins and fragments to launch from the list", press Deselect All, check off the application's plug-in(s), and press Add Required Plug-ins. In 3.1, there is also a Validate Plug-in Set button to check that all prerequisites have been satisfied, without having to launch first. On the Main tab, be sure that the correct product or application is selected (using a product is preferred -- see the <a href="">Branding Your Application</a> article).

When running a deployed RCP application (not running from within Eclipse), ensure that the config.ini file in the configuration directory points to the correct product or application extension via the eclipse.product or eclipse.application entry (using a product is preferred -- see the <a href="">Branding Your Application</a> article). Either all plug-ins need to be specified in the osgi.bundles entry of the config.ini, or the org.eclipse.update.configurator plug-in should be included to discover all available plug-ins the first time the application is run.

If eclipse fails silently, look in the configuration and/or workspace directories for a .log file. If you use the eclipse.exe launcher (or equivalent on other platforms) it will tell you where to find any relevant log file.

Try adding -consolelog, -debug and -clean to the command line (as program arguments, not VM arguments). For example, to run the browser example with an explicitly specified product:

  d:\j2sdk1.4.2_01\bin\java org.eclipse.core.launcher.Main -product org.eclipse.ui.examples.rcp.browser.product -consolelog -clean -debug
  eclipse -vm d:\j2sdk1.4.2_01\bin\java -product org.eclipse.ui.examples.rcp.browser.product -consolelog -clean -debug

-consolelog causes any log entries to be sent to the console as well (to get a console window, be sure to use java as the VM instead of javaw).

 -debug causes Eclipse to log extra information about plug-in dependency problems (see <a href="">here</a> for more background). 

-clean forces Eclipse to re-read all the plugin.xml files rather than using its cached representation of the plug-in registry.

While these options are helpful for debugging, note that there is a performance penalty for -debug and -clean, so it is not recommended that they be used in the final product.

For other troubleshooting hints, see the Troubleshooting section of the <a href="">RCP Tutorial, part 1</a>.

<a name="orphanPlugins">Q: My own RCP plug-ins are contributed by a feature. Why is the update manager complaining that my configuration is invalid?</a>

If you're using a feature only for the plug-ins you write, the update manager does not check dependencies on "orphan" plug-ins (i.e. plug-ins not contributed by a feature) so the configuration appears invalid. You will need to either:

  1. include all the plug-ins (yours and the RCP plug-ins) into your feature, or
  2. create another feature for the RCP plug-ins.

<a name="nonResourceEditors">Q: Are editors tied to the workspace resource model or to the broader notion of files?</a>

No. The concept of an editor in the workbench and the corresponding types (IEditorPart, EditorPart, IEditorInput) are not tied to the workspace resource model, or even to the notion of files (whether in the workspace or the file system). Editors can be used for any kind of model, and can be textual or graphical.

The Text component provides support for text editors. See the entry for the Text component in the <a href="#otherComponents">list of optional components</a> above. See also the <a href="main.html#text_editor_example">RCP text editor example</a>.

Eugene Ostroukhov has published <a href="">a useful blog entry</a> describing how to create a non-file-based editor that connects to a database. See also <a href="">this update</a>.


Back to the top