Bug 29919 - PolylineConnections being held onto by default anchors in AbstractConnectionEditPart
Summary: PolylineConnections being held onto by default anchors in AbstractConnectionE...
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eric Bordeau CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-21 15:59 EST by Eric Bordeau CLA
Modified: 2003-01-21 16:04 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Bordeau CLA 2003-01-21 15:59:43 EST
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.
Comment 1 Eric Bordeau CLA 2003-01-21 16:04:12 EST
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.