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
ConstructorsConstructorDescriptionDifferenceGroupRegistryImpl(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.voidclear()Clear the registry.getDefaultGroupProvider(IComparisonScope scope, Comparison comparison) Returns the default group provider.getGroupProviders(IComparisonScope scope, Comparison comparison) Returns the list ofIDifferenceGroupProvidercontained in the registry.Remove from the registry theIDifferenceGroupProviderdesignated by the givenString.
-
Constructor Details
-
DifferenceGroupRegistryImpl
public DifferenceGroupRegistryImpl(DifferenceGroupManager groupManager, IItemRegistry<IDifferenceGroupProvider.Descriptor> registry) Constructs the registry.- Parameters:
groupManager-DifferenceGroupManageruse 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 ofIDifferenceGroupProvidercontained in the registry.- Specified by:
getGroupProvidersin 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
IDifferenceGroupProvidercontained in the registry. - See Also:
-
getDefaultGroupProvider
public IDifferenceGroupProvider.Descriptor getDefaultGroupProvider(IComparisonScope scope, Comparison comparison) Returns the default group provider.- Specified by:
getDefaultGroupProviderin 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:
addin 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 theIDifferenceGroupProviderdesignated by the givenString.- Specified by:
removein interfaceIDifferenceGroupProvider.Descriptor.Registry- Parameters:
className- The givenStringrepresenting aIDifferenceGroupProvider.- Returns:
- The
IDifferenceGroupProviderdesignated by the givenString. - See Also:
-
clear
public void clear()Clear the registry.- Specified by:
clearin interfaceIDifferenceGroupProvider.Descriptor.Registry- See Also:
-