Package org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.customization

# Class ContentMergeViewerCustomizationRegistry

java.lang.Object
org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.customization.ContentMergeViewerCustomizationRegistry

public class ContentMergeViewerCustomizationRegistry extends Object
The registry responsible for managing the content merge viewer customizations.

## Constructor Summary

Constructors
Constructor
Description
`ContentMergeViewerCustomizationRegistry()`
Constructs and initialized this registry.

## Method Summary

Modifier and Type
Method
Description
`void`
`addCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemProvider> descriptor)`
Adds the given `ContentMergeViewerCustomizationDescriptor` to this registry, using the given `className` as the identifier.
`void`
`addTreeCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemContentProvider> descriptor)`
Adds the given `ContentMergeViewerCustomizationDescriptor` to this registry, using the given `className` as the identifier.
`void`
`clear()`
Clears out all registered listeners from this registry.
`IMergeViewerItemContentProvider`
`getBestFittingMergeViewerItemContentProvider(Comparison comparison, Object object)`
Returns the best fitting `IMergeViewerItemContentProvider`.
`IMergeViewerItemProvider`
`getBestFittingMergeViewerItemProvider(Comparison comparison, Object object)`
Returns the best fitting `IMergeViewerItemProvider`.
`void`
`removeDescriptor(String className)`
Removes the `ContentMergeViewerCustomizationDescriptor` and its managed
invalid reference

    IDependencyProvider

identified by the given `className` from this registry.

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

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

## Constructor Details

### ContentMergeViewerCustomizationRegistry

public ContentMergeViewerCustomizationRegistry()
Constructs and initialized this registry.

## Method Details

### addCustomization

public void addCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemProvider> descriptor)
Adds the given `ContentMergeViewerCustomizationDescriptor` to this registry, using the given `className` as the identifier.

Parameters:
  `className` - The identifier for the given `ContentMergeViewerCustomizationDescriptor`.
  `descriptor` - The `ContentMergeViewerCustomizationDescriptor` which is to be added to this registry.

### addTreeCustomization

public void addTreeCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemContentProvider> descriptor)
Adds the given `ContentMergeViewerCustomizationDescriptor` to this registry, using the given `className` as the identifier.

Parameters:
  `className` - The identifier for the given `ContentMergeViewerCustomizationDescriptor`.
  `descriptor` - The `ContentMergeViewerCustomizationDescriptor` which is to be added to this registry.

### removeDescriptor

public void removeDescriptor(String className)
Removes the `ContentMergeViewerCustomizationDescriptor` and its managed
invalid reference

    IDependencyProvider

identified by the given `className` from this registry.

Parameters:
  `className` - Identifier of the provider we are to remove from this registry.

### clear

public void clear()
Clears out all registered listeners from this registry.

### getBestFittingMergeViewerItemProvider

public IMergeViewerItemProvider getBestFittingMergeViewerItemProvider(Comparison comparison, Object object)
Returns the best fitting `IMergeViewerItemProvider`.

Parameters:
  `comparison` - the `Comparison` is used to check the context.
  `object` - the `Object` for which the `IMergeViewerItemProvider` is responsible.
Returns:
  the determined `IMergeViewerItemProvider` if one exists, `null` otherwise.

### getBestFittingMergeViewerItemContentProvider

public IMergeViewerItemContentProvider getBestFittingMergeViewerItemContentProvider(Comparison comparison, Object object)
Returns the best fitting `IMergeViewerItemContentProvider`.

Parameters:
  `comparison` - the `Comparison` is used to check the context.
  `object` - the `Object` for which the `IMergeViewerItemContentProvider` is responsible.
Returns:
  the determined `IMergeViewerItemContentProvider` if one exists, `null` otherwise.