Class BatchMerger

  • All Implemented Interfaces:
    IBatchMerger

    public class BatchMerger
    extends Object
    implements IBatchMerger
    This implementation of an IBatchMerger leaves some choice to the client as to what should be merged.
    Since:
    3.0
    • Constructor Detail

      • BatchMerger

        public BatchMerger​(IMerger.Registry registry)
        Constructs our batch merger provided the registry from which to retrieve the delegate mergers. Using such a merger will merge every differences passed to its "copy" methods : conflictual or not.
        Parameters:
        registry - The registry from which we'll retrieve delegate mergers, must be an instance of IMerger.Registry2.
      • BatchMerger

        public BatchMerger​(IDiffRelationshipComputer relationshipComputer)
        Constructs our batch merger provided the registry from which to retrieve the delegate mergers. Using such a merger will merge every differences passed to its "copy" methods : conflictual or not.
        Parameters:
        relationshipComputer - The relationship computer used to calculate dependencies and requirements of diffs.
        Since:
        3.5
      • BatchMerger

        public BatchMerger​(IMerger.Registry registry,
                           com.google.common.base.Predicate<? super Diff> filter)
        Constructs our batch merger provided the registry from which to retrieve the delegate mergers, and a filter if you only wish to merge specific differences.

        Note that the filter indicates differences that will be merged, not those that will be ignored.

        For example, if you wish to ignore all differences in conflict, you can use :

         IMerger.Registry registry = IMerger.RegistryImpl.createStandaloneInstance();
         IBatchMerger bathMerger = new BatchMerger(registry, not(hasConflict(ConflictKind.PSEUDO, ConflictKind.REAL)));
         bathMerger.copyAll...
         

        Parameters:
        registry - The registry from which we'll retrieve delegate mergers, must be an instance of IMerger.Registry2.
        filter - Additional filter for the differences. This could be set in order to ignore diffs originating from a given side. Note that the filter describes the differences that will be merged, not those that will be ignored.
        See Also:
        Predicates, EMFComparePredicates
      • BatchMerger

        public BatchMerger​(IDiffRelationshipComputer relationshipComputer,
                           com.google.common.base.Predicate<? super Diff> filter)
        Constructs our batch merger provided the registry from which to retrieve the delegate mergers, and a filter if you only wish to merge specific differences.

        Note that the filter indicates differences that will be merged, not those that will be ignored.

        For example, if you wish to ignore all differences in conflict, you can use :

         IMerger.Registry registry = IMerger.RegistryImpl.createStandaloneInstance();
         IBatchMerger bathMerger = new BatchMerger(registry, not(hasConflict(ConflictKind.PSEUDO, ConflictKind.REAL)));
         bathMerger.copyAll...
         

        Parameters:
        filter - Additional filter for the differences. This could be set in order to ignore diffs originating from a given side. Note that the filter describes the differences that will be merged, not those that will be ignored.
        relationshipComputer - The relationship computer used to calculate dependencies and requirements of diffs.
        Since:
        3.5
        See Also:
        Predicates, EMFComparePredicates