Optional: Adding a property editor or compiler

If you need to control how the properties of your node are displayed, you can create a property editor by implementing the IPropertyEditor interface. A property editor is not limited in content. It can contain many controls, like text fields, lists, and so on.

If you want to create a custom compiler, for example to encrypt a value before sending it to the server, you can create a compiler by implementing the IPropertyCompiler interface.

Importing the plug-in API into the workbench

To create a property editor or compiler, you must first import the plug-in API into the workbench, as follows:
  1. Click File > Import > External Plug-ins and Fragments.
  2. Click Next.
  3. Select the com.ibm.etools.mft.api plug-in.
  4. When the plug-in is imported in the workspace, right-click the plug-in, and click Update Classpath.
  5. The com.ibm.etools.mft.api plug-in is selected. Click Finish.
  6. From the Window menu, click Preferences.
  7. Expand Plug-in development and select Target Platform.
  8. Click Not in Workspace to select all plug-ins except the com.ibm.etools.mft.api plug-in that you have just imported into the workbench.
  9. Click OK.
  10. Switch to the Java perspective.
  11. Select your user-defined node project in the Package Explorer, and click Project > Clean Project.
  12. Right-click on your user-defined node project, and click Update Classpath.

Creating the Java class using WebSphere Business Integration Message Broker Version 5.0

When you have imported the plug-in API into the workbench, you can then use the API to create a new Java class for your property editor or compiler, as follows:

  1. From the user-defined node project, select the /src directory.
  2. Click File > New > Class.
  3. Type a name for your class in the Name text field.
  4. Delete any text in the Superclass text field, and click Browse.
  5. Select AbstractPropertyEditor.
  6. Click OK.
  7. Click Add next to the Interface text field.
  8. Select the IPropertyEditor interface or the IPropertyCompiler interface, or both.
  9. Click Finish.

See the com.ibm.etools.mft.api javadoc for a full explanation of how to implement each method to create a property editor or compiler.

Testing your property editor or compiler

If you want to test your property editor, launch another instance of the workbench, and select Run > Run as > Runtime Workbench. See the PDE Guide for more information about testing using the Runtime Workbench.

If you want to test your compiler, deploy the flow containing your user-defined node on a broker.

Related reference
User-defined extensions