Element endpt1 = connPart.getEndpoint1();
Element endpt2 = connPart.getEndpoint2();
DiagramNodePart nodePart1 = this.diagramEditor.getDiagramNodePart(endpt1);
if (nodePart1 != null && nodePart1.getDiagramNodeTemplate() == nodeTemplate)
{
notifyConnectionAddEvent(new ConnectionAddEvent(connPart));
}
else
{
DiagramNodePart nodePart2 = this.diagramEditor.getDiagramNodePart(endpt2);
if (nodePart2 != null && nodePart2.getDiagramNodeTemplate() == nodeTemplate)
{
notifyConnectionAddEvent(new ConnectionAddEvent(connPart));
}
}
}
}