Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362973

Summary: Wrong tether polyline start point on LabelEditParts when using himetric-based diagrams
Product: [Modeling] GMF-Runtime Reporter: Andreas Unger <unger>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Andreas Unger CLA 2011-11-05 15:12:20 EDT
Build Identifier: 20110615-0604

When using himetric-based diagrams, the start point of the tether polyline (dashed feedback line) between LabelEditParts and other EditParts (usually the parent of the LabelEditPart) is always on the right side of the LabelEditPart. The expected behavior is that the start point is attached to the LabelEditPart side which is most close to the parent EditPart. This works properly for pixel-based diagrams.

The bug can be tracked down to the NonResizableLabelEditPolicy#showChangeBoundsFeedback(ChangeBoundsRequest) method. Here, the reference point -- which is later used to compute the closest side -- is obtained from the LabelEditPart (line 67). However, the reference point is not translated to absolute, and thus is not converted to device unit, as it is done for the other values. As a result, the calculation for the closest LabelEditPart side is mixing logical  and device units resulting in an erroneous side.

I attached a patch which fixes the problem for me.

Reproducible: Always

Steps to Reproduce:
1. Create himetric-based diagram
2. Create connection containing a label
3. Move the label -> it will always stick to the right label side
Comment 1 Andreas Unger CLA 2011-11-05 15:12:58 EDT
Created attachment 206493 [details]
Patch