com.starbase.starteam.viewcomparemerge
Class Custom3WayMergeAdapter

java.lang.Object
  |
  +--com.starbase.starteam.viewcomparemerge.FileMergeAdapter
        |
        +--com.starbase.starteam.viewcomparemerge.Custom3WayMergeAdapter

public class Custom3WayMergeAdapter
extends FileMergeAdapter

Facilitates the use of an external merge tool to resolve a 3-way file merge condition. For example:

     String app = "C:\\MyApp\\MyApp.exe";
     String commandline = "-s $source -t $target -a $ancestor -out $result";
     FileMergeAdapter tool = new Custom3WayMergeAdapter(diff, app, commandline);
     int exitCode = tool.merge();
     if (exitCode == 0) {
         System.out.println("The merge was successful!");
     } else {
         System.out.println("MyApp failed with exit code: " + exitCode);
     }
 

See Also:
WorkstationDefaultMergeAdapter, StarTeamFileMergeAdapter, VisMergeAdapter, FileMergeAdapter

Field Summary
 
Fields inherited from class com.starbase.starteam.viewcomparemerge.FileMergeAdapter
PARAM_COMMON_ANCESTOR, PARAM_OUTPUT_FILE, PARAM_SOURCE_ANCESTOR, PARAM_SOURCE_FILE, PARAM_TARGET_ANCESTOR, PARAM_TARGET_FILE
 
Constructor Summary
Custom3WayMergeAdapter(ItemDifference diff, java.lang.String application, java.lang.String commandline)
          Constructs an adapter for resolving a given file merge condition.
 
Methods inherited from class com.starbase.starteam.viewcomparemerge.FileMergeAdapter
merge
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Custom3WayMergeAdapter

public Custom3WayMergeAdapter(ItemDifference diff,
                              java.lang.String application,
                              java.lang.String commandline)
Constructs an adapter for resolving a given file merge condition.

Parameters:
diff - The ItemDifference whose file merge condition is to be resolved.
application - The path to the external application to be run.
commandline - The paramaters to be passed to the application on the command line. May contain the special command-line symbols defined in FileMergeAdapter, which are expanded to file names before the application is executed.
See Also:
FileMergeAdapter.PARAM_SOURCE_FILE, FileMergeAdapter.PARAM_TARGET_FILE, FileMergeAdapter.PARAM_COMMON_ANCESTOR, FileMergeAdapter.PARAM_OUTPUT_FILE


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.