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 begin

Before you can create a 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 RCP view or editor.

About this task

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:

Procedure

  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.

What to do next

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.


Feedback