Creating an RCP editor in the visual editor

The visual editor for Java supports the creation and development of Rich Client Platform (RCP) editors.

Before you can create a new Java visual class, you must create a Java project or Plug-in project where you can place the visual class. A Plug-in project that is enabled for Rich Client Platform (RCP) application development is required if you want to create a new RCP view or editor.
An RCP editor is a class that extends org.eclipse.ui.part.EditorPart. You can use the New Java Visual Class wizard to quickly create a new visual class that extends EditorPart. The wizard creates the EditorPart and adds an SWT composite as the default container. You can then use the SWT controls and containers to design the contents of the editor.

To create an RCP editor:

  1. Complete the steps for Creating a new Java visual class, specifying RCP Editor in the Style list. The new Java class opens in the visual editor showing the EditorPart with a composite.
    New visual class in the design view showing an EditorPart
  2. Use the SWT controls and containers to design the contents of the editor. See Adding a component to a Java visual class and Working with SWT in the visual editor for more information.
You can test the editor independently by running it as a Java bean (Run > Run As > Java Bean).

To incorporate the editor into your plug-in, you need to register the editor as an extension in your project and programmatically display it as part of your application. For more information about adding an editor extension point to your Rich Client Platform application or rich client plug-in, see org.eclipse.ui.editors

Related tasks
Creating a new Java visual class
Creating an RCP view in the visual editor

(C) Copyright IBM Corporation 1999, 2004. All Rights Reserved.