Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.workbench
Class RegistryReader

    java.lang.Object
      ru.biosoft.workbench.RegistryReader

Direct Known Subclasses:
  PerspectiveRegistry.PerspectiveExtensionRegistryReader, PerspectiveRegistry.PerspectiveRegistryReader, ViewRegistry.ViewRegistryReader

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.

Field Summary
`protected org.apache.log4j.Category` | `cat`

Constructor Summary
`protected` | `RegistryReader(org.apache.log4j.Category cat)` The constructor.

Method Summary
`protected void` | `logError(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String text, java.lang.Throwable t)` Logs the error in the workbench log using the provided text and the information in the configuration element.
`protected void` | `logMissingAttribute(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String attributeName)` Logs a very common registry error when a required attribute is missing.
`protected void` | `logUnknownElement(org.eclipse.core.runtime.IConfigurationElement element)` Logs a registry error when the configuration element is unknown.
`protected void` | `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.
`protected abstract boolean` | `readElement(org.eclipse.core.runtime.IConfigurationElement element)` Implement this method to read element's attributes.
`protected void` | `readElementChildren(org.eclipse.core.runtime.IConfigurationElement element)` Read the element's children.
`protected void` | `readElements(org.eclipse.core.runtime.IConfigurationElement[] elements)` Read each element one at a time by calling the subclass implementation of `readElement`.
`protected void` | `readExtension(org.eclipse.core.runtime.IExtension extension)` Read one extension by looping through its configuration elements.
`protected void` | `readRegistry(java.lang.String extensionPoint)` Start the registry reading process using the specified extension point.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### cat

    protected org.apache.log4j.Category cat

Constructor Detail

### RegistryReader

    protected RegistryReader(org.apache.log4j.Category cat)

  The constructor.

Method Detail

### logError

    protected void logError(org.eclipse.core.runtime.IConfigurationElement element,
                            java.lang.String text,
                            java.lang.Throwable t)

  Logs the error in the workbench log using the provided text and the information in the configuration element.

### logMissingAttribute

    protected void logMissingAttribute(org.eclipse.core.runtime.IConfigurationElement element,
                                       java.lang.String attributeName)

  Logs a very common registry error when a required attribute is missing.

### logUnknownElement

    protected void logUnknownElement(org.eclipse.core.runtime.IConfigurationElement element)

  Logs a registry error when the configuration element is unknown.

### orderExtensions

    protected void 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.

### readElement

    protected abstract boolean readElement(org.eclipse.core.runtime.IConfigurationElement element)

  Implement this method to read element's attributes. If children should also be read, then implementor is responsible for calling `readElementChildren`. Implementor is also responsible for logging missing attributes.

  Returns:
    true if element was recognized, false if not.

### readElementChildren

    protected void readElementChildren(org.eclipse.core.runtime.IConfigurationElement element)

  Read the element's children. This is called by the subclass' readElement method when it wants to read the children of the element.

### readElements

    protected void readElements(org.eclipse.core.runtime.IConfigurationElement[] elements)

  Read each element one at a time by calling the subclass implementation of `readElement`. Logs an error if the element was not recognized.

### readExtension

    protected void readExtension(org.eclipse.core.runtime.IExtension extension)

  Read one extension by looping through its configuration elements.

### readRegistry

    protected void readRegistry(java.lang.String extensionPoint)

  Start the registry reading process using the specified extension point.

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.