source = new Plug(origin, origin.getOutputPipeTypes().keySet().iterator().next());
dest = new Plug(target, target.getInputPipeTypes().keySet().iterator().next());
}
else
{
CreateEdgeDialog dlg = new CreateEdgeDialog(origin, target);
int result = JOptionPane.showConfirmDialog(parent, dlg, "Create a pipe", JOptionPane.OK_CANCEL_OPTION);
if (result == JOptionPane.OK_OPTION)
{
source = dlg.getSource();
dest = dlg.getDest();
}
}
String datatype = null;
if (source != null)
datatype = origin.getOutputPipeTypes().get(source.getPort());