castPort
.setAssociatedPort((MirrorPort) insidePort);
}
// Create a link only if it doesn't already exist.
List connectedPorts = insidePort
.connectedPortList();
if (!connectedPorts.contains(castPort)) {
// There is no connection. Create one.
ComponentRelation newRelation = newRelation(uniqueName("relation"));