org.eclipse.stp.core.internal
Class RegistryReader

java.lang.Object
  extended by org.eclipse.stp.core.internal.RegistryReader
Direct Known Subclasses:
ComponentTypeIntrospectorRegistry

public abstract class RegistryReader
extends java.lang.Object

Template implementation of a registry reader that creates objects representing registry contents. Typically, an extension contains one element, but this reader handles multiple elements per extension. To start reading the extensions from the registry for an extension point, call the method readRegistry. To read children of an IConfigurationElement, call the method readElementChildren from your implementation of the method readElement, as it will not be done by default.


Method Summary
static java.lang.String getClassValue(org.eclipse.core.runtime.IConfigurationElement configElement, java.lang.String classAttributeName)
          Utility for extracting the value of a class attribute or a nested class element that follows the pattern set forth by IExecutableExtension.
static java.lang.String getDescription(org.eclipse.core.runtime.IConfigurationElement configElement)
          Utility for extracting the description child of an element.
static org.eclipse.core.runtime.IExtension[] orderExtensions(org.eclipse.core.runtime.IExtension[] extensions)
          Apply a reproducable order to the list of extensions provided, such that the order will not change as extensions are added or removed.
 void readRegistry()
           
 void readRegistry(org.eclipse.core.runtime.IExtensionRegistry registry, java.lang.String pluginId, java.lang.String extensionPoint)
          Start the registry reading process using the supplied plugin ID and extension point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readRegistry

public void readRegistry()

orderExtensions

public static org.eclipse.core.runtime.IExtension[] orderExtensions(org.eclipse.core.runtime.IExtension[] extensions)
Apply a reproducable order to the list of extensions provided, such that the order will not change as extensions are added or removed.

Parameters:
extensions - the extensions to order
Returns:
ordered extensions

readRegistry

public void readRegistry(org.eclipse.core.runtime.IExtensionRegistry registry,
                         java.lang.String pluginId,
                         java.lang.String extensionPoint)
Start the registry reading process using the supplied plugin ID and extension point.

Parameters:
registry - the registry to read from
pluginId - the plugin id of the extenion point
extensionPoint - the extension point id

getDescription

public static java.lang.String getDescription(org.eclipse.core.runtime.IConfigurationElement configElement)
Utility for extracting the description child of an element.

Parameters:
configElement - the element
Returns:
the description
Since:
3.1

getClassValue

public static java.lang.String getClassValue(org.eclipse.core.runtime.IConfigurationElement configElement,
                                             java.lang.String classAttributeName)
Utility for extracting the value of a class attribute or a nested class element that follows the pattern set forth by IExecutableExtension.

Parameters:
configElement - the element
classAttributeName - the name of the class attribute to check
Returns:
the value of the attribute or nested class element
Since:
3.1