Package org.eclipse.emf.compare.merge
Class IMerger.RegistryImpl
java.lang.Object
org.eclipse.emf.compare.merge.IMerger.RegistryImpl
- All Implemented Interfaces:
IMerger.Registry
,IMerger.Registry2
- Enclosing interface:
- IMerger
A default implementation of an
IMerger.Registry
. This is the implementation EMF Compare will
use through its GUI.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a merger to the registry.void
clear()
Clear the registry.static IMerger.Registry
Returns a registry filled with the default mergers provided by EMF Compare; namelyAttributeChangeMerger
,ReferenceChangeMerger
,FeatureMapChangeMerger
,ResourceAttachmentChangeMerger
,PseudoConflictMerger
andConflictMerger
.getHighestRankingMerger
(Diff target) Returns the merger, for the given target, owning the highest ranking.getMergers
(Diff target) Returns the list of the candidate mergers for the given difference.getMergersByRankDescending
(Diff diff, IMergeCriterion criterion) Provide the mergers sorted by rank descending.Removes a merger from the registry, from its class name.
-
Constructor Details
-
RegistryImpl
public RegistryImpl()Constructor.
-
-
Method Details
-
createStandaloneInstance
Returns a registry filled with the default mergers provided by EMF Compare; namelyAttributeChangeMerger
,ReferenceChangeMerger
,FeatureMapChangeMerger
,ResourceAttachmentChangeMerger
,PseudoConflictMerger
andConflictMerger
.- Returns:
- A registry filled with the default mergers provided by EMF Compare.
-
add
Adds a merger to the registry.- Specified by:
add
in interfaceIMerger.Registry
- Parameters:
merger
- The merger.- Returns:
- The previously registered merger.
- See Also:
-
remove
Removes a merger from the registry, from its class name.- Specified by:
remove
in interfaceIMerger.Registry
- Parameters:
className
- The class name.- Returns:
- The previously registered merger.
- See Also:
-
clear
public void clear()Clear the registry.- Specified by:
clear
in interfaceIMerger.Registry
- See Also:
-
getHighestRankingMerger
Returns the merger, for the given target, owning the highest ranking.- Specified by:
getHighestRankingMerger
in interfaceIMerger.Registry
- Parameters:
target
- The given target difference.- Returns:
- The found merger.
- See Also:
-
getMergersByRankDescending
Provide the mergers sorted by rank descending.- Specified by:
getMergersByRankDescending
in interfaceIMerger.Registry2
- Parameters:
diff
- The diffcriterion
- The merge criterion, can benull
- Returns:
- the registered mergers valid for the given diff and criterion, sorted by rank descending.
- Since:
- 3.3
-
getMergers
Returns the list of the candidate mergers for the given difference. If the given difference is null, return all known mergers.- Specified by:
getMergers
in interfaceIMerger.Registry
- Parameters:
target
- The given difference.- Returns:
- The list of the found mergers.
- See Also:
-