Community
Participate
Working Groups
Build Identifier: M20100211-1343 It is a regression. Given a pointList including only the origin and the extremity which are identical: * With GMF Runtime 1.2.1, PointListUtilities.calculatePointRelativeToLine returns a point, equals to the origin and the extremity. Expected. * With GMF Runtime 1.3.0, it returns null. PointListUtilities.getLineSegments(PointList) implementation has changed and does not consider zero-sized segments anymore. An NPE is thrown by LabelHelper.offsetFromRelativeCoordinate (and also NonResizableLabelEditPolicy.showChangeBoundsFeedback) when we are trying to locate a label around a zero-sized connection. Reproducible: Always Steps to Reproduce: Can be reproduced programmatically (nodes at the same place, zero-sized connections and programmatically by moving labels through ChangeBoundsRequests).
GMF 2.2.1 and 2.2.2, not 1.2.1 and 1.3.0.
Created attachment 178109 [details] patch That looks like a bad fix from me. Changed PointListUtilities#getLineSegments(PointList) not to create linesegments where origin == terminal. Methods working with a line created going through line segment threw exceptions and felt like a line segment with origin == terminus is not really a line segment and hence cannot be treated as such. Seems like it's too late for this adjustment. Hence, I'm reverting the fix for PointListUtilities#getLineSegments(PointList) and removing segments where origin == terminus myself where they need to be removed. Patch attached. Anthony, can you please review this fix?
(In reply to comment #2) > Created an attachment (id=178109) [details] > patch > > That looks like a bad fix from me. > > Changed PointListUtilities#getLineSegments(PointList) not to create > linesegments where origin == terminal. Methods working with a line created > going through line segment threw exceptions and felt like a line segment with > origin == terminus is not really a line segment and hence cannot be treated as > such. > Seems like it's too late for this adjustment. Hence, I'm reverting the fix for > PointListUtilities#getLineSegments(PointList) and removing segments where > origin == terminus myself where they need to be removed. > > Patch attached. > > Anthony, can you please review this fix? OK, sounds good. The patch is good to commit.
Alex, can you commit today (now) so we can run RC3?
Sorry for the late delivery. Delivered to R1_4_maintenance and HEAD.