*/
protected void disconnectConnectionEnd(){
CompoundEdit ce = new CompoundEdit();
if (_elementContainer.getSelection().getShapeCount()==1 && _elementContainer.getSelection().getSelectedShape(0) instanceof ConnectionPathSelection){
ConnectionPathSelection cs = (ConnectionPathSelection)_elementContainer.getSelection().getSelectedShape(0);
Connection connection = cs.getConnection();
if( cs.isFirstEndSelected() && connection.getFirstEndGate()!=null ){
Gate firstGate = connection.getFirstEndGate();
connection.disconnect(firstGate);
ce.addEdit(new GateDisconnectEdit(connection, firstGate,true));
} else if( cs.isLastEndSelected() && connection.getLastEndGate()!=null ){
Gate lastGate = connection.getLastEndGate();
connection.disconnect(lastGate);
ce.addEdit(new GateDisconnectEdit(connection, lastGate,false));
}
}