Implementing a custom editor for all properties of a specific type

You can implement a property editor to provide a custom graphical interface for all properties of a specific type.

About this task

When you implement a custom editor, you can associate the implementation with all properties of a specific type.

Procedure

To integrate the implementation of a custom editor for all properties of a specific type:

  1. Create a plug-in project that depends on the plug-in: ilog.rules.studio.ui.

    For hep with creating a plug-in project, see Creating a plug-in project.

  2. Define a custom property editor by implementing the Eclipse class CellEditor.
  3. In this plug-in, define an extension for ilog.rules.studio.ui.propertyEditors.

    For help with defining a plug-in extension, see Defining a plug-in extension.

  4. In the extension point, set these attributes:
    • Use the target attribute to specify the type of the properties to which you want the editor to be attached

    • Use the cellEditorClass attribute to specify the name of the editor

    For example, to assign the editor IlrBoolCellEditor to all properties of the type EBoolean, you specify the extension as follows:

    <extension point="ilog.rules.studio.ui.propertyEditors">
       <propertyEditor 
          target="EBoolean"
          cellEditorClass=
    "ilog.rules.studio.brm.ui.propertysheet.editors.IlrBooleanCellEditor">
       </propertyEditor>
    </extension>
  5. Save the plug-in project.
  6. Deploy the plug-in.

    For help with deploying a plug-in, see Deploying a plug-in.

Results

Your custom property editor for all properties of a given type is now saved, built, and deployed to your Rule Designer installation.