saveCUnitIfNeeded(unit, new SubProgressMonitor(pm, 1));
// element.delete(false, new SubProgressMonitor(pm, 1));
IResource resource = unit.getResource();
if (resource != null) {
ResourceDescription resourceDescription = ResourceDescription
.fromResource(resource);
element.delete(false, new SubProgressMonitor(pm, 1));
resourceDescription.recordStateFromHistory(resource,
new SubProgressMonitor(pm, 1));
return new UndoDeleteResourceChange(resourceDescription);
} else {
element.delete(false, pm);
}