com.ibm.commons.swt.data.editors.support
Class EditorRegistry

java.lang.Object
  extended by com.ibm.commons.swt.util.registry.PluginRegistryReader
      extended by com.ibm.commons.swt.data.editors.support.EditorRegistry

public class EditorRegistry
extends com.ibm.commons.swt.util.registry.PluginRegistryReader

A singleton registry that reads the Eclipse extension point registry and stores information relating to all contributed PropertyEditor extensions.

See Also:
PropertyEditor

Nested Class Summary
static class EditorRegistry.Category
          A category by which the property editor can be grouped.
static class EditorRegistry.ClassEditorDescription
          A concrete implementation of com.ibm.commons.swt.data.editors.support.EditorRegistry.EditorDescription.
static class EditorRegistry.EditorDescription
          An abstract description of the editor as defined in the extension point com.ibm.commons.swt.data.xspPropertyEditor.
 
Method Summary
 PropertyEditor createEditor(java.lang.String id, java.lang.String parameters)
          Creates a property editor using the given id and parameters.
 EditorRegistry.Category getCategory(java.lang.String name)
          Returns an entire category of editors.
 java.lang.String[] getEditorIds()
          Returns an array of type java.lang.String.
 EditorRegistry.EditorDescription[] getEditors()
          Returns an array of descriptors.
static EditorRegistry getInstance()
          Returns a static instance of this class.
protected  void readElement(org.eclipse.core.runtime.IConfigurationElement element)
           
 void register(EditorRegistry.Category category)
           
 void register(EditorRegistry.EditorDescription description)
           
 void unregister(EditorRegistry.Category category)
           
 void unregister(EditorRegistry.EditorDescription description)
           
 
Methods inherited from class com.ibm.commons.swt.util.registry.PluginRegistryReader
logError, logMissingAttribute, logMissingElement, logUnknownElement, readPluginRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EditorRegistry getInstance()
Returns a static instance of this class.

Returns:

register

public void register(EditorRegistry.Category category)

unregister

public void unregister(EditorRegistry.Category category)

getCategory

public EditorRegistry.Category getCategory(java.lang.String name)
Returns an entire category of editors.

Parameters:
name -
Returns:
A category of editors

register

public void register(EditorRegistry.EditorDescription description)
Parameters:
description -

unregister

public void unregister(EditorRegistry.EditorDescription description)

getEditors

public EditorRegistry.EditorDescription[] getEditors()
Returns an array of descriptors. The descriptors describe each of the property editors available on the current platform.

Returns:
an array of editor descriptors
See Also:
EditorRegistry.EditorDescription

createEditor

public PropertyEditor createEditor(java.lang.String id,
                                   java.lang.String parameters)
                            throws com.ibm.commons.iloader.node.NodeException
Creates a property editor using the given id and parameters.

Parameters:
id -
parameters -
Returns:
Throws:
com.ibm.commons.iloader.node.NodeException

readElement

protected void readElement(org.eclipse.core.runtime.IConfigurationElement element)
Specified by:
readElement in class com.ibm.commons.swt.util.registry.PluginRegistryReader

getEditorIds

public java.lang.String[] getEditorIds()
Returns an array of type java.lang.String. The array contains the ids of all editors that are contributed to the platform.

Returns:
java.lang.String[]