Class DifferenceGroupRegistryImpl
java.lang.Object
org.eclipse.emf.compare.rcp.ui.internal.structuremergeviewer.groups.impl.DifferenceGroupRegistryImpl
- All Implemented Interfaces:
IDifferenceGroupProvider.Descriptor.Registry
public class DifferenceGroupRegistryImpl
extends Object
implements IDifferenceGroupProvider.Descriptor.Registry
Implementation of the
IDifferenceGroupProvider.Descriptor.Registry
. This implementation allow user
to override ranking of each group using preferences.- Since:
- 4.0
-
Constructor Summary
ConstructorDescriptionDifferenceGroupRegistryImpl
(DifferenceGroupManager groupManager, IItemRegistry<IDifferenceGroupProvider.Descriptor> registry) Constructs the registry. -
Method Summary
Modifier and TypeMethodDescriptionadd
(IDifferenceGroupProvider.Descriptor providerDescriptor, String className) Add to the registry the givenIDifferenceGroupProvider
.void
clear()
Clear the registry.getDefaultGroupProvider
(IComparisonScope scope, Comparison comparison) Returns the default group provider.getGroupProviders
(IComparisonScope scope, Comparison comparison) Returns the list ofIDifferenceGroupProvider
contained in the registry.Remove from the registry theIDifferenceGroupProvider
designated by the givenString
.
-
Constructor Details
-
DifferenceGroupRegistryImpl
public DifferenceGroupRegistryImpl(DifferenceGroupManager groupManager, IItemRegistry<IDifferenceGroupProvider.Descriptor> registry) Constructs the registry.- Parameters:
groupManager
-DifferenceGroupManager
use to handle groups.registry
- Item registry where are stored all registered group.
-
-
Method Details
-
getGroupProviders
public List<IDifferenceGroupProvider.Descriptor> getGroupProviders(IComparisonScope scope, Comparison comparison) Returns the list ofIDifferenceGroupProvider
contained in the registry.- Specified by:
getGroupProviders
in interfaceIDifferenceGroupProvider.Descriptor.Registry
- Parameters:
scope
- The scope on which the group providers will be applied.comparison
- The comparison which is to be displayed in the structural view.- Returns:
- The list of
IDifferenceGroupProvider
contained in the registry. - See Also:
-
getDefaultGroupProvider
public IDifferenceGroupProvider.Descriptor getDefaultGroupProvider(IComparisonScope scope, Comparison comparison) Returns the default group provider.- Specified by:
getDefaultGroupProvider
in interfaceIDifferenceGroupProvider.Descriptor.Registry
- Parameters:
scope
- The scope on which the group providers will be applied.comparison
- The comparison which is to be displayed in the structural view.- Returns:
- the default group provider or null if none.
- See Also:
-
add
public IDifferenceGroupProvider.Descriptor add(IDifferenceGroupProvider.Descriptor providerDescriptor, String className) Add to the registry the givenIDifferenceGroupProvider
.- Specified by:
add
in interfaceIDifferenceGroupProvider.Descriptor.Registry
- Parameters:
providerDescriptor
- The givenIDifferenceGroupProvider
.className
- The class name of the given provider.- Returns:
- The previous value associated with the class name of the given
IDifferenceGroupProvider
, or null if there was no entry in the registry for the class name. - See Also:
-
remove
Remove from the registry theIDifferenceGroupProvider
designated by the givenString
.- Specified by:
remove
in interfaceIDifferenceGroupProvider.Descriptor.Registry
- Parameters:
className
- The givenString
representing aIDifferenceGroupProvider
.- Returns:
- The
IDifferenceGroupProvider
designated by the givenString
. - See Also:
-
clear
public void clear()Clear the registry.- Specified by:
clear
in interfaceIDifferenceGroupProvider.Descriptor.Registry
- See Also:
-