com.starteam.viewcomparemerge
Class WorkstationDefaultMergeAdapter
java.lang.Object
com.starteam.viewcomparemerge.FileMergeAdapter
com.starteam.viewcomparemerge.WorkstationDefaultMergeAdapter
public class WorkstationDefaultMergeAdapter
- extends FileMergeAdapter
Uses the workstation default merge tool to resolve a file merge condition.
For example:
FileMergeAdapter tool = new WorkstationDefaultMergeAdapter(diff);
int exitCode = tool.merge();
if (exitCode == 0) {
System.out.println("The merge was successful!");
} else {
System.out.println("The merge failed with exit code: " + exitCode);
}
Note that if no file merge tool is registered in starteam-client-options.xml,
then StarTeam File Compare / Merge (also known as "Delta II") is used by
default.
- See Also:
StarTeamFileMergeAdapter,
VisMergeAdapter,
CustomThreeWayMergeAdapter,
FileMergeAdapter
|
Method Summary |
int |
merge()
Runs the external merge tool with parameters that are appropriate for
resolving the merge condition of this adapter's ItemDifference. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkstationDefaultMergeAdapter
public WorkstationDefaultMergeAdapter(ItemDifference diff)
- Constructs an adapter for resolving a given file merge condition.
- Parameters:
diff - The ItemDifference whose file merge condition is to be
resolved.
merge
public int merge()
throws java.io.IOException
- Runs the external merge tool with parameters that are appropriate for
resolving the merge condition of this adapter's ItemDifference.
If the merge is successful, then the adapter applies the output merged
file content to the ItemDifference, and marks the merge condition as
resolved.
Any temporary files created during the process are automatically removed.
- Overrides:
merge in class FileMergeAdapter
- Returns:
- The tool's exit code. Zero on success.
- Throws:
java.io.IOException - If an error occurs during the invocation of the tool.
StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.