// Parse port
ComponentPort port = _getPort(portName, context);
// Save to help generate undo MoML
int origNumOutsideLinks = port.numLinks();
int origNumInsideLinks = port.numInsideLinks();
// Get relation if given
ComponentRelation relation = null;
if (relationName != null) {