Object currentObject = getProjectController().getCurrentObject();
if (content != null && currentObject != null) {
PasteCompoundUndoableEdit undoableEdit = new PasteCompoundUndoableEdit();
DataDomain domain = getProjectController().getCurrentDataDomain();
DataMap map = getProjectController().getCurrentDataMap();
if (content instanceof List) {
for (Object o : (List) content) {
paste(currentObject, o);
undoableEdit.addEdit(new PasteUndoableEdit(domain, map, currentObject, o));
}
}
else {
paste(currentObject, content);
undoableEdit.addEdit(new PasteUndoableEdit(domain, map, currentObject, content));
}
application.getUndoManager().addEdit(undoableEdit);
}
}