# ========================================
#   Sample ToolSelector Profile Ini File  
# ========================================
# EnSoft Corp.
# 
# ToolSelector.exe is a utility program that takes arguments provided to it and
# selects another tool (program) to execute based on certain properties of
# those arguments.  The manner in which it does so is determined by a "profile"
# that is loaded by ToolSelector.exe from an "ini" file such as this one.  More  
# details about the general operation of ToolSelector.exe can be found in the
# ToolSelector user manual.
#
# This sample profile is configured to select between two different diff tools,
# based on the file extension of the arguments that are passed to ToolSelector.
# The two tools configured in this example are EnSoft's own Simulink model
# comparison and merge tool SimDiff, and Scooter Software's general-purpose
# diff tool Beyond Compare.  It is assumed that the caller of ToolSelector
# (presumably a repository client) will pass the following arguments to
# ToolSelector:
#
#    <target path> <contributor path> <base/ancestor path> <output path>
# 
# Each property is specified one per line, with the following form:
# 
#    <property-name> = <property-value>
#
# See the Java documentation for method java.util.Properties.load(java.io.Reader)
# for more detailed information on the syntax:
#
#    https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html#load-java.io.Reader-
#
# Property names are generally organized hierarchically using dot characters as
# separators.  Individual properties are documented in further detail below.
#
# One notable quirk of the file format - backslash characters are an escape
# character, so they must be doubled, e.g.:
#
#    C:\\Program Files\\...
#

# List the tools that are specified in this profile here, as well as the order
# that ToolSelector will evaluate them in.  Tools can be given any tool
# identifier, except for "profile" (that keyword is reserved for global profile
# properties)
# To support both 'mdl' and 'slx' file extensions, two tool identifiers must be 
# specified: 'simdiff_mdl', and 'simdiff_slx'.
profile.tool-priority = simdiff_mdl simdiff_slx default

# Each tool entry must minimally specify a path to the tool and an arguments
# mapping.  Arguments are specified as a pattern that can be applied by the
# Java MessageFormat class, and are zero-based. 
simdiff_mdl.path = C:\\Program Files\\EnSoft\\SimDiff\\simdiff4.exe
simdiff_mdl.args = -compare -l {0} -r {1}

# Tools may also specify one or more rules.  ToolSelector will select the first
# tool it evaluates that do not fail any rule tests (a tool with no rules will
# always be selected when evaluated).  There are different types of rules;
# please see the user manual for details.  The "rules" property should list all
# rules defined for this tool by an identifier of your choice.
simdiff_mdl.rules = mdl

# Each rule must specify a type.  The specified type determines the type of
# rule to apply, and also determines what additional parameters can be
# specified.  The "file-extension" rule has two parameters - an extension
# to check for, and a list of arguments to check for that extension
simdiff_mdl.rule.mdl.type = file-extension

# The extension can be specified with or without the leading dot.
simdiff_mdl.rule.mdl.extension = .mdl

# The arguments are specified as one or more integer ranges.  Ranges are
# defined by two numbers separated by two dots, and are inclusive on both ends.
# Single arguments can also be specified, and commas separate multiple ranges
# and single arguments.  Here is a more complex example:
#   1..2, 4, 7..9
simdiff_mdl.rule.mdl.args = 0..1


# Define simdiff_slx similarly to simdiff_mdl tool
simdiff_slx.path = C:\\Program Files\\EnSoft\\SimDiff\\simdiff4.exe
simdiff_slx.args = -compare -l {0} -r {1}
simdiff_slx.rules = slx
simdiff_slx.rule.slx.type = file-extension
simdiff_slx.rule.slx.extension = .slx
simdiff_slx.rule.slx.args = 0..1

# 'default' is not a reserved keyword, but it can be used as the identifier for
# a tool
default.path = C:\\Program Files\\Beyond Compare\\bcomp.exe
default.args = {0} {1}

# Sometimes repositories use the tool's return code to determine whether or not
# a merge was successful.  ToolSelector can replace certain return code values
# with a different value to fix this.  The format is a source value or range,
# then '>>', then a destination value.  Multiple replacements can be specified
# and separated by commas.
default.returncodes = 0..2 >> 0, 11..14 >> 1
