Package org.eclipse.emf.compare.merge
Interface IMerger
- All Known Subinterfaces:
IMerger2
- All Known Implementing Classes:
AbstractMerger
,AdditiveConflictMerger
,AdditiveReferenceChangeMerger
,AdditiveResourceAttachmentChangeMerger
,AttributeChangeMerger
,ConflictMerger
,FeatureMapChangeMerger
,PseudoConflictMerger
,ReferenceChangeMerger
,ResourceAttachmentChangeMerger
,ResourceLocationChangeMerger
public interface IMerger
Mergers are used by EMF Compare to merge specific differences from one side to the other. A number of
default mergers are provided by EMF Compare, but they can be sub-classed and extended by clients through
the extension point "org.eclipse.emf.compare.ide.mergerExtension".
Clients are encouraged to subclass AbstractMerger instead of implementing IMerger so that they can benefit from a maximum of the common procedures.
- Since:
- 3.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
This will hold all registered mergers.static interface
Registry that can provide its mergers sorted by rank descending.static class
A default implementation of anIMerger.Registry
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyLeftToRight
(Diff target, Monitor monitor) Executes the copy from left to right.void
copyRightToLeft
(Diff target, Monitor monitor) Executes the copy from right to left.int
Returns the ranking of this merger.Get the registry.boolean
isMergerFor
(Diff target) Check if the merger is a good candidate to merge the given difference.void
setRanking
(int parseInt) Set the ranking of this merger.void
setRegistry
(IMerger.Registry registry) Set the registry containing this merger.
-
Method Details
-
isMergerFor
Check if the merger is a good candidate to merge the given difference.- Parameters:
target
- The given target difference.- Returns:
- True if it is the good candidate, false otherwise.
-
getRanking
int getRanking()Returns the ranking of this merger.- Returns:
- The ranking.
-
setRanking
void setRanking(int parseInt) Set the ranking of this merger.- Parameters:
parseInt
- The ranking.
-
copyRightToLeft
Executes the copy from right to left.- Parameters:
target
- The difference to handle.monitor
- Monitor.
-
copyLeftToRight
Executes the copy from left to right.- Parameters:
target
- The difference to handle.monitor
- Monitor.
-
setRegistry
Set the registry containing this merger.- Parameters:
registry
- The merger registry.
-
getRegistry
IMerger.Registry getRegistry()Get the registry.- Returns:
- The registry.
-