public interface IStorageMerger
IStorage
. The merged result is written to an output stream.
Clients must implement this interface when contributing new mergers to the
org.eclipse.team.core.storageMergers
extension point.
Modifier and Type | Field and Description |
---|---|
static int |
CONFLICT
Indicates that a change conflict prevented the merge from successful completion (value
1 ) |
static int |
INTERNAL_ERROR
Status code describing an internal error (value
2 ) |
static int |
OK
Indicates the successful completion of the merge operation (value
IStatus.OK ) |
static int |
UNSUPPORTED_ENCODING
Indicates that at least one of the encodings associated with the input was unsupported (value
3 ) |
Modifier and Type | Method and Description |
---|---|
boolean |
canMergeWithoutAncestor()
Return whether this merger can merge the two contributors
without an ancestor.
|
IStatus |
merge(OutputStream output,
String outputEncoding,
IStorage ancestor,
IStorage target,
IStorage other,
IProgressMonitor monitor)
Performs a merge operation on the given storage instances and writes the merge result to the output stream.
|
static final int OK
IStatus.OK
)static final int CONFLICT
1
)static final int INTERNAL_ERROR
2
)static final int UNSUPPORTED_ENCODING
3
)IStatus merge(OutputStream output, String outputEncoding, IStorage ancestor, IStorage target, IStorage other, IProgressMonitor monitor) throws CoreException
IStatus.OK
is returned, on error a status IStatus.ERROR
.
If the merge operation cannot deal with conflicts, the code of the error status has the value IStreamMerger.CONFLICT
.
For text oriented mergers the encoding for the input and output is honored if they implement
IEncodedStorage
.
It is the responsibility of callers to close the output stream.
The provided ancestor may be null
if this merger
returns true
from canMergeWithoutAncestor()
.
output
- the byte stream to which the merge result is written; the merger will not close the streamoutputEncoding
- the encoding to use when writing to the output streamancestor
- the storage from which the common ancestor is readtarget
- the storage containing the target of the mergeother
- the storage containing the target of the mergemonitor
- reports progress of the merge operationCoreException
- if an error occursboolean canMergeWithoutAncestor()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.