a.action = new ActionRetractFact( rf.getBoundName() );
a.boundName = rf.getBoundName();
actions.add( a );
}
} else if ( c instanceof ActionSetFieldCol ) {
ActionSetFieldCol sf = (ActionSetFieldCol) c;
LabelledAction a = findByLabelledAction( actions,
sf.getBoundName() );
if ( a == null ) {
a = new LabelledAction();
a.boundName = sf.getBoundName();
if ( !sf.isUpdate() ) {
a.action = new ActionSetField( sf.getBoundName() );
} else {
a.action = new ActionUpdateField( sf.getBoundName() );
}
actions.add( a );
} else if ( sf.isUpdate()
&& !(a.action instanceof ActionUpdateField) ) {
// lets swap it out for an update as the user has asked
// for it.
ActionSetField old = (ActionSetField) a.action;
ActionUpdateField update = new ActionUpdateField( sf.getBoundName() );
update.fieldValues = old.fieldValues;
a.action = update;
}
ActionSetField asf = (ActionSetField) a.action;
ActionFieldValue val = new ActionFieldValue( sf.getFactField(),
cell,
sf.getType() );
asf.addFieldValue( val );
}
}
}