Connection connection = _elementContainer.getSelection().getConnectionAt(gateAnchor.x, gateAnchor.y);
if (connection != null && !connection.isConnected(gate)){
// first connection bound is free
if ( gate.canBeHanged(connection.getPath().getNode(0)) && connection.getFirstEndGate()==null){
_currentTrackedGates.add(new TrackedGate(connection, true, gate));
// last connection bound is free
} else if ( gate.canBeHanged(connection.getPath().getNode(connection.getPath().getNodeNumber()-1))
&& connection.getLastEndGate()==null){