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 IMergerMergers 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
Nested Classes Modifier and Type Interface Description static interfaceIMerger.RegistryThis will hold all registered mergers.static interfaceIMerger.Registry2Registry that can provide its mergers sorted by rank descending.static classIMerger.RegistryImplA default implementation of anIMerger.Registry.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcopyLeftToRight(Diff target, Monitor monitor)Executes the copy from left to right.voidcopyRightToLeft(Diff target, Monitor monitor)Executes the copy from right to left.intgetRanking()Returns the ranking of this merger.IMerger.RegistrygetRegistry()Get the registry.booleanisMergerFor(Diff target)Check if the merger is a good candidate to merge the given difference.voidsetRanking(int parseInt)Set the ranking of this merger.voidsetRegistry(IMerger.Registry registry)Set the registry containing this merger.
-
-
-
Method Detail
-
isMergerFor
boolean isMergerFor(Diff target)
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
void copyRightToLeft(Diff target, Monitor monitor)
Executes the copy from right to left.- Parameters:
target- The difference to handle.monitor- Monitor.
-
copyLeftToRight
void copyLeftToRight(Diff target, Monitor monitor)
Executes the copy from left to right.- Parameters:
target- The difference to handle.monitor- Monitor.
-
setRegistry
void setRegistry(IMerger.Registry registry)
Set the registry containing this merger.- Parameters:
registry- The merger registry.
-
getRegistry
IMerger.Registry getRegistry()
Get the registry.- Returns:
- The registry.
-
-