209210211212213214215216217218219
CompoundEdit compoundEdit = new RemoveCompoundUndoableEdit(); for (Object path : paths) { compoundEdit.addEdit(removeLastPathComponent(path)); } compoundEdit.end(); application.getUndoManager().addEdit(compoundEdit); } }