Eclipse Rich Client Platform - Text Infrastructure
Eclipse Rich Client Platform

The rich client platform (RCP) is a major theme since Eclipse 3.0. As many applications provide some sort of text editing, an optional RCP Text component is provided.

Optional Text Editing Components

Applications that want to offer text editing capabilities may include the following eclipse plug-ins which are an optional part of RCP i.e. they are not included in the RCP Runtime Binary available from the Eclipse Project download page but they can be extracted from the Platform Runtime Binary download):

  • org.eclipse.text
  • org.eclipse.jface.text
  • org.eclipse.ui.workbench.texteditor
  • since 3.3: org.eclipse.ui.editors - provides a Text editor but drags in plug-ins like:
    • org.eclipse.ui.ide
    • org.eclipse.core.resources
    Use this if the resulting size of your RCP isn't important and you don't want to write your own editor.
RCP Text Editor Example

The RCP Text Editor Example is a simple RCP application that creates own text editors using the text editing infrastructure (an optional RCP component) and offers text editing capabilities such as shifting, moving and deleting lines, find/replace, auto-completion and basic syntax highlighting for markup languages. See also the documentation and implementation notes.

To load the RCP text editor example source into your workspace:

  1. Download the texteditor source plug-in and save it on your harddisk.
  2. Choose File > Import... > Existing Project into Workspace.
  3. Click the Browse... button to select the zip file you downloaded in step 1.
  4. Press Finish.
To run the example from your workspace:
  1. Choose Run > Run Configurations...
  2. Under 'Eclipse Application', there should be a new launch configuration: 'RCP Text Editor'.
  3. Click 'Run'.
  4. When the RCP Text Editor Example window opens, use File > Open to open a plain text, .xml, or .html file.

Default Text Editor Example (requires R3.3 or later)

This example shows how to use the Eclipse Text editor in your RCP application. As mentioned above this requires to add several additional plug-ins and hence increases the size of the resulting RCP application.

To load the default Text editor example source into your workspace:

  1. Download the texteditor source plug-in and save it on your harddisk.
  2. Choose File > Import... > Existing Project into Workspace.
  3. Click the Browse... button to select the zip file you downloaded in step 1.
  4. Press Finish.

To run the example from your workspace:

  1. Choose Run > Run Configurations...
  2. Under 'Eclipse Application', there should be a new launch configuration: 'RCP Text Editor'.
  3. Click Run.
  4. When the RCP Text Editor Example window opens, use File > Open to open a plain text, .xml, or .html file.