public enum MergeMode extends Enum<MergeMode>
| Enum Constant and Description | 
|---|
| ACCEPTAccept the diff to merge. | 
| LEFT_TO_RIGHTMerge from left to right. | 
| REJECTReject the diff to merge. | 
| RIGHT_TO_LEFTMerge form right to left. | 
| Modifier and Type | Method and Description | 
|---|---|
| MergeOperation | getMergeAction(Diff difference,
              boolean isLeftEditable,
              boolean isRightEditable)Returns the required action to be done to the given difference in this mode. | 
| static MergeMode | getMergeMode(Diff diff,
            boolean leftEditable,
            boolean rightEditable) | 
| DifferenceSource | getMergeTarget(boolean isLeftEditable,
              boolean isRightEditable)Returns the target of the merge with the given condition about the left and right sides. | 
| MergeMode | inverse()Returns the inverse of this enum. | 
| boolean | isLeftToRight(boolean isLeftEditable,
             boolean isRightEditable)Returns if this mode will lead to merge to left to right depending whether left and/or right are
 editable. | 
| boolean | isLeftToRight(Diff diff,
             boolean isLeftEditable,
             boolean isRightEditable)To exactly know the way of merge (to compute consequences) we need the source of the diff. | 
| static MergeMode | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static MergeMode[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final MergeMode LEFT_TO_RIGHT
public static final MergeMode RIGHT_TO_LEFT
public static final MergeMode ACCEPT
public static final MergeMode REJECT
public static MergeMode[] values()
for (MergeMode c : MergeMode.values()) System.out.println(c);
public static MergeMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic MergeMode inverse()
public DifferenceSource getMergeTarget(boolean isLeftEditable, boolean isRightEditable)
isLeftEditable - is the left side editable.isRightEditable - is the right side editable.public boolean isLeftToRight(boolean isLeftEditable,
                             boolean isRightEditable)
isLeftEditable - is left side of the comparison editable.isRightEditable - is right side of the comparison editable.public boolean isLeftToRight(Diff diff, boolean isLeftEditable, boolean isRightEditable)
diff - the diff to merge.isLeftEditable - is left side of the comparison editable.isRightEditable - is right side of the comparison editable.public MergeOperation getMergeAction(Diff difference, boolean isLeftEditable, boolean isRightEditable)
difference - the difference to analyze.isLeftEditable - is left side of the comparison editable.isRightEditable - is right side of the comparison editable.
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.