Eclipse RCP Browser Example

Last updated May 21, 2004

Description

This is an example of a simple Eclipse Rich Client Platform (RCP) application. It is a bare bones web browser, using the SWT Browser control.

The code is in package org.eclipse.ui.examples.browser, and consists of an application class (BrowserApp), a workbench advisor for configuring the workbench (BrowserAdvisor), and a single perspective (BrowserPerspectiveFactory) containing a single view (BrowserView).

The application defines several built-in actions in the menu and toolbar that are typical for web browsers (Back, Forward, Stop, Refresh). These are added in BrowserActionBuilder when a new window is opened (see BrowserAdvisor.fillActionBars(...)). These actions are defined as retargetable actions, for which the view registers handling actions.

The view consists of an address bar (a Label and a Text control) and the Browser control. To handle status and progress events, it simply passes on the relevant events from the Browser control to the Workbench status line.

Running the example

To run the RCP Browser example from within the Eclipse SDK:
  1. Load project org.eclipse.ui.examples.rcp.browser from the Eclipse repository into a self-hosting workspace.
  2. Create a new "Run-time workbench" launch configuration called "Browser Example".
  3. On the "Arguments" tab, select "Run a product" and choose select "org.eclipse.ui.examples.rcp.browser.product" from the drop-down.
  4. On the "Plug-ins" tab, configure it to include only the required plug-ins:
  5. Run or debug the launch config.