{
// Skip target parameters that already have an expression assigned.
continue;
}
DataTypeItem sourceType = sourceParam.getDataType();
DataTypeItem targetType = targetParam.getDataType();
switch (mode)
{
case DLA_IDENTICAL_NAMES:
// Data link autoconnector operation mode: Connect identical names
if (sourceParam.getName().equals(targetParam.getName()))
{
if (sourceType == targetType || targetType.isBaseTypeOf(sourceType))
{
return targetParam;
}
}
break;
case DLA_IDENTICAL_TYPES:
// Data link autoconnector operation mode: Connect identical types
if (sourceType == targetType)
{
return targetParam;
}
break;
case DLA_COMPATIBLE_TYPES:
// Data link autoconnector operation mode: Connect compatible types
if (targetType.isBaseTypeOf(sourceType))
{
return targetParam;
}
break;