Class MemoryMergeManager

  • All Implemented Interfaces:
    MergeResolver

    public class MemoryMergeManager
    extends java.lang.Object
    implements MergeResolver
    Merge memory blocks that have changes to the name, permissions or comments.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply()
      Notification that the apply button was hit.
      void cancel()
      Notification that the merge process was canceled.
      java.lang.String getDescription()
      Get the description of what this MergeResolver does.
      java.lang.String getName()
      Get the name of this MergeResolver.
      java.lang.String[][] getPhases()
      Gets identifiers for the merge phases handled by this MergeResolver.
      void merge​(TaskMonitor monitor)
      Perform the merge process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemoryMergeManager

        public MemoryMergeManager​(ProgramMultiUserMergeManager mergeManager,
                                  Program resultProgram,
                                  Program myProgram,
                                  Program originalProgram,
                                  Program latestProgram)
        Constructor
        Parameters:
        mergeManager - merge manager
        resultProgram - program where changes will be applied to
        myProgram - source program with changes that will be applied to result program
        originalProgram - original program that was checked out
        latestProgram - latest program that was checked in; the result program and latest program are initially identical
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: MergeResolver
        Get the name of this MergeResolver.
        Specified by:
        getName in interface MergeResolver
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: MergeResolver
        Get the description of what this MergeResolver does.
        Specified by:
        getDescription in interface MergeResolver
      • apply

        public void apply()
        Description copied from interface: MergeResolver
        Notification that the apply button was hit.
        Specified by:
        apply in interface MergeResolver
      • cancel

        public void cancel()
        Description copied from interface: MergeResolver
        Notification that the merge process was canceled.
        Specified by:
        cancel in interface MergeResolver
      • merge

        public void merge​(TaskMonitor monitor)
        Description copied from interface: MergeResolver
        Perform the merge process.
        Specified by:
        merge in interface MergeResolver
        Parameters:
        monitor - monitor that allows the user to cancel the merge operation
      • getPhases

        public java.lang.String[][] getPhases()
        Description copied from interface: MergeResolver
        Gets identifiers for the merge phases handled by this MergeResolver. If the merge has no sub-phases then return an array with a single string array. Each inner String array indicates a path for a single merge phase. Each outer array element represents a phase whose progress we wish to indicate.
        Examples:
        So for a simple phase which has no sub-phases return new String[][] {new String[] {"Phase A"}}
        So for a phase with 2 sub-phases return new String[][] { new String[] {"Phase A"}, new String[] {"Phase A", "Sub-Phase 1}, new String[] {"Phase A", "Sub-Phase 2} } .
        Specified by:
        getPhases in interface MergeResolver
        Returns:
        an array of phases.