* @param link The data link
* @return The new figure or null on error
*/
public ParamConnection createParamConnection(DataLink link)
{
Param source = link.getSourceParam();
Param target = link.getTargetParam();
if (source == null)
{
System.err.println("Missing source parameter for data link '" + link.getQualifier() + "'");
return null;
}
if (target == null)
{
System.err.println("Missing target parameter for data link '" + link.getQualifier() + "'");
return null;
}
ParamFigure sourceFigure = null;
ParamFigure targetFigure = null;
if (source instanceof NodeParam)
{
sourceFigure = (ParamFigure) source.getRepresentation();
if (sourceFigure == null)
{
System.err.println("Data link source parameter '" + source.getQualifier() + "' has no figure representation.");
return null;
}
}
if (target instanceof NodeParam)
{
targetFigure = (ParamFigure) target.getRepresentation();
if (targetFigure == null)
{
System.err.println("Data link target parameter '" + target.getQualifier() + "' has no figure representation.");
return null;
}
}
if (source instanceof ProcessVariable && targetFigure != null)