* @param toPort
*/
private void connect(Port fromPort, Port toPort) {
try {
// check the validity of the connection.
Edge edge = this.graph.addEdge(fromPort, toPort);
selectEdge(edge);
} catch (GraphException e) {
logger.error(e.getMessage(), e);
this.engine.getGUI().getErrorWindow().warning(e.getMessage());
} catch (RuntimeException e) {