Package org.eclipse.emf.compare.rcp.internal.extension.impl

# Class DescriptorRegistryEventListener<T>

java.lang.Object
org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener
org.eclipse.emf.compare.rcp.internal.extension.impl.DescriptorRegistryEventListener<T>

Type Parameters:
  `T` - one descriptor type

All Implemented Interfaces:
  `EventListener`, `org.eclipse.core.runtime.IRegistryEventListener`

public class DescriptorRegistryEventListener<T> extends AbstractRegistryEventListener
Base class for Descriptor Registry.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener

`AbstractRegistryEventListener.Action`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DESCRITPION_DESCRIPTOR_ATTR`
Description attribute of extension point.
`static final String`
`ID_DESCRIPTOR_ATTR`
Id attribute of the extension point.
`static final String`
`IMPL_CLASS_DESCRIPTOR_ATTR`
Engine implementation class attribute of extension point.
`static final String`
`LABEL_DESCRIPTOR_ATTR`
Label attribute of extension point.
`static final String`
`RANK_DESCRIPTOR_ATTR`
Rank attribute of extension point.
`static final String`
`TAG_DESCRIPTOR`
Descriptor tag of extension point.

## Constructor Summary

Constructors
Constructor
Description
`DescriptorRegistryEventListener(String namespace, String extensionPointID, org.eclipse.core.runtime.ILog log, IItemRegistry<T> registry)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected boolean`
`addedValid(org.eclipse.core.runtime.IConfigurationElement element)`
Process the given element as the addition of a valid element extension.
`protected boolean`
`removedValid(org.eclipse.core.runtime.IConfigurationElement element)`
Process the given element as the removal of a valid element extension.
`protected boolean`
`validateExtensionElement(org.eclipse.core.runtime.IConfigurationElement element)`
Validates if the given element is an element for the given extension and is well constructed.

### Methods inherited from class org.eclipse.emf.compare.rcp.extension.AbstractRegistryEventListener

`added, added, log, log, log, logMissingAttribute, readElement, readRegistry, removed, removed`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### LABEL_DESCRIPTOR_ATTR

public static final String LABEL_DESCRIPTOR_ATTR
Label attribute of extension point.

See Also:
  - Constant Field Values

### DESCRITPION_DESCRIPTOR_ATTR

public static final String DESCRITPION_DESCRIPTOR_ATTR
Description attribute of extension point.

See Also:
  - Constant Field Values

### IMPL_CLASS_DESCRIPTOR_ATTR

public static final String IMPL_CLASS_DESCRIPTOR_ATTR
Engine implementation class attribute of extension point.

See Also:
  - Constant Field Values

### RANK_DESCRIPTOR_ATTR

public static final String RANK_DESCRIPTOR_ATTR
Rank attribute of extension point.

See Also:
  - Constant Field Values

### ID_DESCRIPTOR_ATTR

public static final String ID_DESCRIPTOR_ATTR
Id attribute of the extension point.

See Also:
  - Constant Field Values

### TAG_DESCRIPTOR

public static final String TAG_DESCRIPTOR
Descriptor tag of extension point.

See Also:
  - Constant Field Values

## Constructor Details

### DescriptorRegistryEventListener

public DescriptorRegistryEventListener(String namespace, String extensionPointID, org.eclipse.core.runtime.ILog log, IItemRegistry<T> registry)
Constructor.

Parameters:
  `namespace` - namespace of the extension point
  `extensionPointID` - id of the extension point
  `log` - Logger
  `registry` - `IItemRegistry` where `IItemDescriptor` will be stored

## Method Details

### validateExtensionElement

protected boolean validateExtensionElement(org.eclipse.core.runtime.IConfigurationElement element)
Validates if the given element is an element for the given extension and is well constructed. Returns true if the element should be further parsed for addition or removal.

Specified by:
  `validateExtensionElement` in class `AbstractRegistryEventListener`
Parameters:
  `element` - the element to validate.
Returns:
  true if the element should be further parsed for addition or removal, else otherwise.
See Also:
  - `AbstractRegistryEventListener.validateExtensionElement(org.eclipse.core.runtime.IConfigurationElement)`

### addedValid

protected boolean addedValid(org.eclipse.core.runtime.IConfigurationElement element)
Process the given element as the addition of a valid element extension.

Specified by:
  `addedValid` in class `AbstractRegistryEventListener`
Parameters:
  `element` - the element to be added.
Returns:
  true if the given element has been added and if its children should be processed, false otherwise.
See Also:
  - `AbstractRegistryEventListener.addedValid(org.eclipse.core.runtime.IConfigurationElement)`

### removedValid

protected boolean removedValid(org.eclipse.core.runtime.IConfigurationElement element)
Process the given element as the removal of a valid element extension.

Specified by:
  `removedValid` in class `AbstractRegistryEventListener`
Parameters:
  `element` - the element to be removed.
Returns:
  true if the given element has been removed and if its children should be processed, false otherwise.
See Also:
  - `AbstractRegistryEventListener.removedValid(org.eclipse.core.runtime.IConfigurationElement)`