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

Bug 354814

Summary: [Composite Structure Diagram] Incorrect location stored for Port in notation model
Product: [Modeling] Papyrus Reporter: Yann Tanguy <yann.tanguy>
Component: CoreAssignee: Yann Tanguy <yann.tanguy>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 0.8.0   
Target Milestone: SR1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Yann Tanguy CLA 2011-08-16 07:52:40 EDT
The location of a BorderItem (ex: Port) is stored relatively to its parent and controlled by a IBorderItemLocator.
As the position is relative, moving the parent has no effect on the Port which is fine.
On the contrary, resizing the parent should trigger a move of the IBorderItem children, which is not currently done.

This is usually invisible as the figure is correctly relocated, but erroneous layout may be visible after reopening the model (the Port may switch on another side or its representation may be erroneous when using "getCurrentSideOfParent" method).
Comment 1 Yann Tanguy CLA 2011-08-16 12:17:31 EDT
Fixed in 0.8.X r5240 & r5241 (trunk r5244).

Not a clean fix as it does assumption on the kind of border item (Port here), instead of using usual edit policies and IBorderItemLocator, but I could not figure out how to achieve this.

The fix moves the Port (or Parameter) after the parent is resized knowing the expected location side and the locator algorithm (simplified here as based on the side and not the proposed position). This can only be possible if the side of parent is correctly calculated which may not be the case currently (due to the fact that the Port location was not updated after parent resize). To avoid incorrect side calculation, the borderItem location is fixed on the fly before the parent is resized.

Note: Additional edit policies have been added on edit parts directly in the generated code, the gmfgen file should be aligned on this. The fix is not applied on diagram opening.
Comment 2 Yann Tanguy CLA 2011-08-16 14:27:55 EDT
Minor update (0.8.1 r5245, trunk r5246).