final int iBaseRowIndex = context.getIndex();
final int iBaseColIndex = context.getColumn();
//Get variable for the column being edited
InterpolationVariable[] allVariables = this.model.getInterpolationVariablesList();
InterpolationVariable baseVariable = allVariables[iBaseColIndex];
final String baseVariableName = baseVariable.getVarName();
//Get other variables (and literals) in the same scope as the base variable
final RuleModelPeerVariableVisitor peerVariableVisitor = new RuleModelPeerVariableVisitor( model,
baseVariableName );
List<ValueHolder> peerVariables = peerVariableVisitor.getPeerVariables();
//Add other variables values
for ( ValueHolder valueHolder : peerVariables ) {
switch ( valueHolder.getType() ) {
case TEMPLATE_KEY :
final int iCol = getVariableColumnIndex( valueHolder.getValue() );
final InterpolationVariable variable = allVariables[iCol];
final String field = variable.getFactField();
//The generic class CellValue can have different data-types so
//we need to convert the cell's value to a String used by the
//dependent enumerations services
final CellValue< ? > cv = this.data.get( iBaseRowIndex ).get( iCol );