} else {
result = EcoreUtil.equals(source.getType(), target.getType());
}
if (result) {
final FlowPort sourcePort = getFlowPortApplication(source);
final FlowPort targetPort = getFlowPortApplication(target);
if (sourcePort == null && targetPort == null)
return true;
if (sourcePort != null && targetPort != null) {
if (isOppositeDirection) {
return sourcePort.getDirection() != targetPort.getDirection()
|| (sourcePort.getDirection() == targetPort.getDirection() && sourcePort
.getDirection() == FlowDirection.INOUT);
}
return sourcePort.getDirection() == targetPort.getDirection();
}
}
return false;
}