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 theIDifferenceGroupProvider.Descriptor.Registry. This implementation allow user to override ranking of each group using preferences.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description DifferenceGroupRegistryImpl(DifferenceGroupManager groupManager, IItemRegistry<IDifferenceGroupProvider.Descriptor> registry)Constructs the registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDifferenceGroupProvider.Descriptoradd(IDifferenceGroupProvider.Descriptor providerDescriptor, String className)Add to the registry the givenIDifferenceGroupProvider.voidclear()Clear the registry.IDifferenceGroupProvider.DescriptorgetDefaultGroupProvider(IComparisonScope scope, Comparison comparison)Returns the default group provider.List<IDifferenceGroupProvider.Descriptor>getGroupProviders(IComparisonScope scope, Comparison comparison)Returns the list ofIDifferenceGroupProvidercontained in the registry.IDifferenceGroupProvider.Descriptorremove(String className)Remove from the registry theIDifferenceGroupProviderdesignated by the givenString.
-
-
-
Constructor Detail
-
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 Detail
-
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:
IDifferenceGroupProvider.Descriptor.Registry.getGroupProviders(IComparisonScope, Comparison)
-
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:
IDifferenceGroupProvider.Descriptor.Registry.getDefaultGroupProvider(org.eclipse.emf.compare.scope.IComparisonScope, org.eclipse.emf.compare.Comparison)
-
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:
(org.eclipse.emf.compare.rcp.ui.structuremergeviewer.groups.IDifferenceGroupProvider.Descriptor)
-
remove
public IDifferenceGroupProvider.Descriptor remove(String className)
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:
IDifferenceGroupProvider.Descriptor.Registry.remove(java.lang.String)
-
clear
public void clear()
Clear the registry.- Specified by:
clearin interfaceIDifferenceGroupProvider.Descriptor.Registry- See Also:
IDifferenceGroupProvider.Descriptor.Registry.clear()
-
-