ProjectController mediator = getProjectController();
ConfirmRemoveDialog dialog = getConfirmDeleteDialog(allowAsking);
if (mediator.getCurrentObjEntity() != null) {
if (dialog
.shouldDelete("ObjEntity", mediator.getCurrentObjEntity().getName())) {
application.getUndoManager().addEdit(
new RemoveUndoableEdit(mediator.getCurrentDataMap(), mediator
.getCurrentObjEntity()));
removeObjEntity(mediator.getCurrentDataMap(), mediator