if (currentState != null)
handler.setCurrentState(currentState);
if (nullEditFeatureCommand != null)
nullEditFeatureCommand.rollback(new SubProgressMonitor(monitor, 10));
EditBlackboard bb = handler.getEditBlackboard(layer);
EditGeom newCurrentGeom = null;
List<EditGeom> empty = bb.getGeoms();
for( EditGeom original : removed ) {
EditGeom inBlackboard = bb.newGeom(original.getFeatureIDRef().get(), original
.getShapeType());
inBlackboard.setChanged(original.isChanged());
if (original == currentGeom)
newCurrentGeom = inBlackboard;
PrimitiveShape destination = inBlackboard.getShell();
newCurrentGeom = setCurrentGeom(newCurrentGeom, destination, original.getShell());
for( Iterator<Coordinate> iter = original.getShell().coordIterator(); iter.hasNext(); ) {
bb.addCoordinate(iter.next(), destination);
}
for( PrimitiveShape shape : original.getHoles() ) {
destination = inBlackboard.newHole();
newCurrentGeom = setCurrentGeom(newCurrentGeom, destination, shape);
for( Iterator<Coordinate> iter = shape.coordIterator(); iter.hasNext(); ) {
bb.addCoordinate(iter.next(), destination);
}
}