int num = macroRecords.size();
if (num>0) {
undoManager.beginInternalAtomicEdit();
try {
for (int i=0; i<num; i++) {
MacroRecord record = (MacroRecord)macroRecords.get(i);
for (int j=0; j<numActions; j++) {
if ((actions[j] instanceof RecordableTextAction) &&
record.id.equals(
((RecordableTextAction)actions[j]).getMacroID())) {
actions[j].actionPerformed(