Interface DiffMergeModelContext

    • Method Detail

      • getLeftModel

        org.eclipse.emf.ecore.EObject getLeftModel()
        Gets the left model.
        Returns:
        the left model
      • getRightModel

        org.eclipse.emf.ecore.EObject getRightModel()
        Gets the right model.
        Returns:
        the right model
      • hasDiff

        boolean hasDiff​(VControl control)
        Checks whether a control has a diff.
        Parameters:
        control - the VControl to check
        Returns:
        true if there is a difference
      • getPairWithDiff

        ControlPair getPairWithDiff​(VControl control)
        Returns a pair containing the left and right control for the diff.
        Parameters:
        control - the control to get the pair for
        Returns:
        a pair or null if no diff exists for the provided control
      • getTotalNumberOfDiffs

        int getTotalNumberOfDiffs()
        Returns the total number of differences.
        Returns:
        the total number of differences
      • getIndexOf

        int getIndexOf​(VControl control)
        Returns the diff index of a control. If the control does not have a diff the index will be -1.
        Parameters:
        control - the VControl to get the index for
        Returns:
        the index of the control
      • getControl

        VControl getControl​(int diffIndex)
                     throws java.lang.IllegalArgumentException
        Returns the control based on the diff index. If the index is less then 0 and greater or equals the total number of diff, then a IllegalArgumentException will be thrown.
        Parameters:
        diffIndex - the diff index to get the control for
        Returns:
        the VControl
        Throws:
        java.lang.IllegalArgumentException - thrown if the index is invalid
      • isControlMerged

        boolean isControlMerged​(VControl vControl)
        Returns true if the control already was merged or doesn't have a difference at all.
        Parameters:
        vControl - the VControl to check
        Returns:
        true if is merged
      • markControl

        void markControl​(VControl vControl,
                         boolean merged)
        Mark a control as merged.
        Parameters:
        vControl - the VControl to be merged
        merged - true if control is merged, false otherwise