Class ContentMergeViewerCustomizationRegistry
java.lang.Object
org.eclipse.emf.compare.rcp.ui.internal.contentmergeviewer.customization.ContentMergeViewerCustomizationRegistry
The registry responsible for managing the content merge viewer customizations.
-
Constructor Summary
ConstructorDescriptionConstructs and initialized this registry. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomization
(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemProvider> descriptor) Adds the givenContentMergeViewerCustomizationDescriptor
to this registry, using the givenclassName
as the identifier.void
addTreeCustomization
(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemContentProvider> descriptor) Adds the givenContentMergeViewerCustomizationDescriptor
to this registry, using the givenclassName
as the identifier.void
clear()
Clears out all registered listeners from this registry.getBestFittingMergeViewerItemContentProvider
(Comparison comparison, Object object) Returns the best fittingIMergeViewerItemContentProvider
.getBestFittingMergeViewerItemProvider
(Comparison comparison, Object object) Returns the best fittingIMergeViewerItemProvider
.void
removeDescriptor
(String className) Removes theContentMergeViewerCustomizationDescriptor
and its managedIDependencyProvider
identified by the givenclassName
from this registry.
-
Constructor Details
-
ContentMergeViewerCustomizationRegistry
public ContentMergeViewerCustomizationRegistry()Constructs and initialized this registry.
-
-
Method Details
-
addCustomization
public void addCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemProvider> descriptor) Adds the givenContentMergeViewerCustomizationDescriptor
to this registry, using the givenclassName
as the identifier.- Parameters:
className
- The identifier for the givenContentMergeViewerCustomizationDescriptor
.descriptor
- TheContentMergeViewerCustomizationDescriptor
which is to be added to this registry.
-
addTreeCustomization
public void addTreeCustomization(String className, ContentMergeViewerCustomizationDescriptor<IMergeViewerItemContentProvider> descriptor) Adds the givenContentMergeViewerCustomizationDescriptor
to this registry, using the givenclassName
as the identifier.- Parameters:
className
- The identifier for the givenContentMergeViewerCustomizationDescriptor
.descriptor
- TheContentMergeViewerCustomizationDescriptor
which is to be added to this registry.
-
removeDescriptor
Removes theContentMergeViewerCustomizationDescriptor
and its managedIDependencyProvider
identified by the givenclassName
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 fittingIMergeViewerItemProvider
.- Parameters:
comparison
- theComparison
is used to check the context.object
- theObject
for which theIMergeViewerItemProvider
is responsible.- Returns:
- the determined
IMergeViewerItemProvider
if one exists,null
otherwise.
-
getBestFittingMergeViewerItemContentProvider
public IMergeViewerItemContentProvider getBestFittingMergeViewerItemContentProvider(Comparison comparison, Object object) Returns the best fittingIMergeViewerItemContentProvider
.- Parameters:
comparison
- theComparison
is used to check the context.object
- theObject
for which theIMergeViewerItemContentProvider
is responsible.- Returns:
- the determined
IMergeViewerItemContentProvider
if one exists,null
otherwise.
-