Implement PropertyEditorSpi

When you have a class that implements PropertyEditorUI, you must create a subclass of com.escenic.studio.editors.spi.PropertyEditorSpi that will create instances of it. This class's supports() method must check for the markup values you have defined for your custom property editor, and its createPropertyEditor() must return an instance of your custom property editor class. For example:

public class MyCustomPropertyEditorSpi extends PropertyEditorSpi {
  public static final URI PLUGIN_URI = URI.create("http://xmlns.escenic.com/2008/studio-plugin");
  public static final String EDITOR = "my-custom-property-editor";
  public static final String ENABLED_ATTRIBUTE = "enabled";
  public static final String ENABLED_ATTRIBUTE_VALUE = "true";

  public boolean supports(final PropertyDescriptor pPropertyDescriptor) {
    return Number.class.isAssignableFrom(pPropertyDescriptor.getType()) &&
        pPropertyDescriptor.getModule(PLUGIN_URI, EDITOR, ENABLED_ATTRIBUTE, ENABLED_ATTRIBUTE_VALUE) != null;
  }

  public PropertyEditorUI createPropertyEditor(final AbstractPropertyBinding pBinding, final ResourceRecorder pResourceRecorder) {
    return new MyCustomPropertyEditorUI(pBinding, pResourceRecorder);
  }
}