Community
Participate
Working Groups
AbstractConnectionEditPart has 2 static XYAnchors (DEFAULT_SOURCE_ANCHOR and DEFAULT_TARGET_ANCHOR) it uses as default anchors when it's missing its source and/or target edit part. When it sets one of these anchors on its connection, the connection adds itself as an AnchorListener to the anchor. When a connection is being deleted from the diagram, AbstractConnectionEditPart sets these default anchors on the connection, the connection adds itself as an AnchorListener and then never removes itself as a listener to the anchors. This happens after removeNotify() gets called on the connection.
I changed the way the default anchors were being declared. I overrode the addAnchorListener(AnchorListener) and removeAnchorListener(AnchorListener) methods so that they do nothing. Those anchors are only there to let the developer know that something went wrong. The connection should have both a source and target edit part that will provide source and target anchors for the connection. If a connection is missing an anchor, it will not be visible on the diagram and the developer may not realize something went wrong.