EmbeddableAttribute[] eAttrs = getProjectController()
.getCurrentEmbAttrs();
application.getUndoManager().addEdit(
new RemoveAttributeUndoableEdit(embeddable, eAttrs));
removeEmbeddableAttributes(embeddable, eAttrs);
}
}
else if (attrs != null && attrs.length > 0) {
if ((attrs.length == 1 && dialog.shouldDelete("ObjAttribute", attrs[0]
.getName()))
|| (attrs.length > 1 && dialog.shouldDelete("selected ObjAttributes"))) {
ObjEntity entity = mediator.getCurrentObjEntity();
ObjAttribute[] attribs = mediator.getCurrentObjAttributes();
application.getUndoManager().addEdit(
new RemoveAttributeUndoableEdit(
mediator.getCurrentDataDomain(),
mediator.getCurrentDataMap(),
entity,
attribs));
removeObjAttributes(entity, attribs);
}
}
else {
DbAttribute[] dbAttrs = getProjectController().getCurrentDbAttributes();
if (dbAttrs != null && dbAttrs.length > 0) {
if ((dbAttrs.length == 1 && dialog.shouldDelete("DbAttribute", dbAttrs[0]
.getName()))
|| (dbAttrs.length > 1 && dialog
.shouldDelete("selected DbAttributes"))) {
DbEntity entity = mediator.getCurrentDbEntity();
DbAttribute[] attribs = mediator.getCurrentDbAttributes();
ProjectPath[] paths = getProjectController().getCurrentPaths();
application.getUndoManager().addEdit(
new RemoveAttributeUndoableEdit(
mediator.getCurrentDataDomain(),
mediator.getCurrentDataMap(),
entity,
attribs));