ElementSelection ss = (ElementSelection)_selectedElements.get(i);
Element as = ss.element;
as.processShapeRemoving();
ce.addEdit(new DeleteEdit((getElementContainer()), as));
if (ss.element instanceof GatedComponent){
GatedComponent gc = (GatedComponent)ss.element;
List gates = gc.getGates();