com.microsoft.tfs.core.externaltools.formatters
Class AbstractToolArgumentFormatter

java.lang.Object
  extended by com.microsoft.tfs.core.externaltools.formatters.AbstractToolArgumentFormatter
Direct Known Subclasses:
CompareToolArgumentFormatter, MergeToolArgumentFormatter, ViewToolArgumentFormatter

public class AbstractToolArgumentFormatter
extends java.lang.Object

Formats command line arguments for launching an external tool process.

Since:
TEE-SDK-10.1

Constructor Summary
AbstractToolArgumentFormatter()
           
 
Method Summary
 java.lang.String[] formatArguments(ExternalTool tool, java.lang.String[] substitutes)
          Formats the given tool's arguments with the given substitute strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractToolArgumentFormatter

public AbstractToolArgumentFormatter()
Method Detail

formatArguments

public final java.lang.String[] formatArguments(ExternalTool tool,
                                                java.lang.String[] substitutes)
Formats the given tool's arguments with the given substitute strings. If too few substitutions are given for the placeholders in the arguments, the arguments simply retain the placeholder strings. If too many substitution strings are given, the extras are ignored.

Parameters:
tool - the ExternalTool whose arguments should be formatted with the given substitute strings (must not be null)
substitutes - the strings to put in place of the substitution strings in the tool's arguments. "%1" in all arguments will be replaced by substitutes[0], "%2" by substitutes[1], etc. (must not be null) (members must not be null)
Returns:
the tool's arguments with the given strings substituted


© 2015 Microsoft. All rights reserved.