public class VersionPickerMergeManager extends AbstractMergeManager
AbstractMergeManager.ConflictSuppressionStrategy
_isErrorMode, _sessionInfo, COMPARE_MERGE_UI_PLUGIN_ID, conflictSuppressionStrategy, IGNORE_ANCESTOR_GUID_FOR_MERGE
Constructor and Description |
---|
VersionPickerMergeManager()
Constructs a new VersionPickerMergeManager
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is to be called from outside when the Compare/Merge Session
is to be completed.
|
CompareResult |
getCompareResult()
Retrieves the last compare result.
|
ContributorType |
getPickedVersion()
Retrieves the contributor type that specifies the contributor that was
last picked by the user.
|
boolean |
isMergeCompleted()
Determines whether merge operation has been completed.
|
boolean |
isMyFileMustBeMergeByMeInEclipseOnly()
Flags for repository provider (such as ClearCase) to determine whether
the file type that registered for this merge manager can be merged
outside of the current IDE with text compare applications (such as
cleardiffmerge.exe)
|
org.eclipse.core.runtime.IStatus |
merge(java.io.OutputStream output,
java.lang.String outputEncoding,
java.io.InputStream ancestor,
java.lang.String ancestorEncoding,
java.io.InputStream target,
java.lang.String targetEncoding,
java.io.InputStream other,
java.lang.String otherEncoding,
org.eclipse.core.runtime.IProgressMonitor monitor)
Performs a merge operation on the given input streams and writes the merge result to the output stream.
|
void |
pickVersion(ContributorType version)
Select an entire version - in case the user choses to pick the entire
contributor rather than perform a fine merge.
|
void |
run(org.eclipse.core.runtime.IProgressMonitor monitor)
Performs the Compare or Merge operation, depending on the information in
the MergeSessionInfo provided through init() method.
|
boolean |
saveMergedContributorAs(IInputOutputDescriptor output)
During the merge session will save the result of the merge in the
specified IInputOutputDescriptor.
|
void |
saveMergedContributorCopy(java.lang.String toPath)
During the merge session will save a copy of the result of the merge in a
merged IInputOutputDescriptor.
|
void |
saveMergedContributorCopy(java.lang.String toPath,
java.lang.String rootModelPath)
During the merge session will save a copy of the result of the merge in a
merged IInputOutputDescriptor.
|
canMergeWithoutAncestor, copyInputToOutput, doBinaryFileCompare, enterErrorMode, getCompareInput, getConflictSuppressionStrategy, getContentTypeID, getController, getMergeDescription, getMergeStatus, getPriority, getSessionInfo, init, isEmptySession, isErrorMode, merge, openInputStream, openOutputStream, saveMergedContributor, setConflictSuppressionStrategy, setContentType, setController, setStatus
public VersionPickerMergeManager()
public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
AbstractMergeManager
run
in interface org.eclipse.jface.operation.IRunnableWithProgress
run
in class AbstractMergeManager
monitor
- to display the progressIRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor)
public ContributorType getPickedVersion()
public void pickVersion(ContributorType version)
public CompareResult getCompareResult()
public boolean isMergeCompleted()
AbstractMergeManager
isMergeCompleted
in class AbstractMergeManager
AbstractMergeManager.isMergeCompleted()
public boolean saveMergedContributorAs(IInputOutputDescriptor output) throws java.io.IOException
AbstractMergeManager
saveMergedContributorAs
in class AbstractMergeManager
output
- the save destinationjava.io.IOException
- if i/o error occurredAbstractMergeManager.saveMergedContributor()
public void close()
AbstractMergeManager
close
in class AbstractMergeManager
AbstractMergeManager.close()
public void saveMergedContributorCopy(java.lang.String toPath) throws java.io.IOException
AbstractMergeManager
saveMergedContributorCopy
in class AbstractMergeManager
toPath
- the absolute file path where to savejava.io.IOException
- if i/o error occurredAbstractMergeManager.saveMergedContributorCopy(java.lang.String)
public void saveMergedContributorCopy(java.lang.String toPath, java.lang.String rootModelPath) throws java.io.IOException
AbstractMergeManager
saveMergedContributorCopy
in class AbstractMergeManager
toPath
- the absolute directory path where to save
rootModelName
the name of the root model filejava.io.IOException
- if i/o error occurredpublic org.eclipse.core.runtime.IStatus merge(java.io.OutputStream output, java.lang.String outputEncoding, java.io.InputStream ancestor, java.lang.String ancestorEncoding, java.io.InputStream target, java.lang.String targetEncoding, java.io.InputStream other, java.lang.String otherEncoding, org.eclipse.core.runtime.IProgressMonitor monitor)
AbstractMergeManager
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 streams is honored.
It is the responsibility of callers to close input and output streams.merge
in interface org.eclipse.compare.IStreamMerger
merge
in class AbstractMergeManager
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 byte stream from which the common ancestor is readancestorEncoding
- the encoding of the ancestor input byte streamtarget
- the byte stream containing the target of the mergetargetEncoding
- the encoding of the target input byte streamother
- the byte stream containing the target of the mergeotherEncoding
- the encoding of the other input byte streammonitor
- reports progress of the merge operationIStreamMerger.merge(java.io.OutputStream, java.lang.String, java.io.InputStream, java.lang.String, java.io.InputStream, java.lang.String, java.io.InputStream, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
public boolean isMyFileMustBeMergeByMeInEclipseOnly()
AbstractMergeManager
isMyFileMustBeMergeByMeInEclipseOnly
in class AbstractMergeManager