public class MergeFacade
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isSupportedFileType(java.lang.String fileType)
Used to determine if a given file name is supported natively by the Merge
Support.
|
protected static boolean |
isSupportedImageType(java.lang.String fileType)
Checks to see if there is an image loader in the swt package for the
given file type.
|
static void |
startSilentCompare(java.lang.String fileType,
IInputOutputDescriptor ancestorInput,
IInputOutputDescriptor olderInput,
IInputOutputDescriptor newerInput,
IMergeStatusCallback callback)
Start silent compare operation.
|
static void |
startSilentMerge(java.lang.String fileType,
IInputOutputDescriptor ancestorInput,
IInputOutputDescriptor olderInput,
IInputOutputDescriptor newerInput,
IInputOutputDescriptor mergedOutput,
IMergeStatusCallback callback)
Start the Silent Merge session for three objects of the same
type.
|
static void |
startVisualCompare(java.lang.String fileType,
IInputOutputDescriptor ancestorInput,
IInputOutputDescriptor olderInput,
IInputOutputDescriptor newerInput,
IMergeStatusCallback callback)
Start the Visual Compare session for two or three objects of the same
type.
|
static void |
startVisualMerge(java.lang.String fileType,
IInputOutputDescriptor ancestorInput,
IInputOutputDescriptor olderInput,
IInputOutputDescriptor newerInput,
IInputOutputDescriptor mergedOutput,
IMergeStatusCallback callback)
Start the Visual Merge session for two or three objects of the same type.
|
public static boolean isSupportedFileType(java.lang.String fileType)
fileType
- to check.public static void startVisualCompare(java.lang.String fileType, IInputOutputDescriptor ancestorInput, IInputOutputDescriptor olderInput, IInputOutputDescriptor newerInput, IMergeStatusCallback callback)
fileType
- the type of the objects to be compared.ancestorInput
- for the "Ancestor" object. It is the "original version" for
both "Older" and "Newer" objects. It must be null for
two-way compare.olderInput
- for the "Older" objectnewerInput
- for the "Newer" objectcallback
- to be notified when the session is finished. Possible
callback's MergeStatusType: COMPLETED, CANCELED, FAILEDpublic static void startVisualMerge(java.lang.String fileType, IInputOutputDescriptor ancestorInput, IInputOutputDescriptor olderInput, IInputOutputDescriptor newerInput, IInputOutputDescriptor mergedOutput, IMergeStatusCallback callback)
fileType
- the type of the objects to be merged.ancestorInput
- for the "Ancestor" object. It is the "original version" for
both "Older" and "Newer" versions. It must be null for
two-way merge.olderInput
- for the "Older" objectnewerInput
- for the "Newer" objectmergedOutput
- to save the result of the mergecallback
- to be notified when the session is finished. Possible
callback's MergeStatusType: COMPLETED, CANCELED, FAILEDpublic static void startSilentMerge(java.lang.String fileType, IInputOutputDescriptor ancestorInput, IInputOutputDescriptor olderInput, IInputOutputDescriptor newerInput, IInputOutputDescriptor mergedOutput, IMergeStatusCallback callback)
If there are no Conflicting Differences, the method will return
MergeStatusType.COMPLETED, which means the merge is done and the correct
merged version is saved in mergedOutput.
If there are Conflicts that can not be resolved, it will return
MergeStatusType UNRESOLVED_CONFLICTS. It means the user interaction is
required and the Visual Merge must be started ( startVisualMerge(...)
)
If Older AND Newer have no differences to merge, it will return
MergeStatusType NO_DIFFS. It means there is nothing to merge and the
Ancestor might be used as result of the merge.
The result of the merge is saved into mergeOutput.
It is SYNC call - it will return when the merge is completed (or failed).
The status is communicated to the caller through the callback .
There is no UI constructed, no warning/information/dialog boxes shown.
The method may be called from NON-UI thread.
fileType
- the type of the objects to be merged.ancestorInput
- for the "Ancestor" object. Can NOT be null as there is
NO two-way silent merge .olderInput
- for the "Older" objectnewerInput
- for the "Newer" objectmergedOutput
- to save the result of the mergecallback
- to be notified when the session is finished. Possible
callback's MergeStatusType: COMPLETED, FAILED,
UNRESOLVED_CONFLICTS, NO_DIFFSpublic static void startSilentCompare(java.lang.String fileType, IInputOutputDescriptor ancestorInput, IInputOutputDescriptor olderInput, IInputOutputDescriptor newerInput, IMergeStatusCallback callback)
fileType
- ancestorInput
- olderInput
- newerInput
- callback
- protected static boolean isSupportedImageType(java.lang.String fileType)
fileType
- -
file name with extension