Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324306 - [Composite Structure Diagram] A connector is added to wrong class, if it connects an inherited port
Summary: [Composite Structure Diagram] A connector is added to wrong class, if it conn...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ansgar Radermacher CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 326932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-09-02 09:43 EDT by Ansgar Radermacher CLA
Modified: 2010-10-25 09:14 EDT (History)
3 users (show)

See Also:


Attachments
First fix (2.32 KB, patch)
2010-10-11 12:07 EDT, Ansgar Radermacher CLA
no flags Details | Diff
Correction of earlier patch (2.32 KB, patch)
2010-10-11 15:04 EDT, Ansgar Radermacher CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ansgar Radermacher CLA 2010-09-02 09:43:48 EDT
Build Identifier: 

If you add a connector to a composite class and connect a port that has been added visually to the class but that is owned by a super-class, the connector is added to the super class, not the composite class.


Reproducible: Always

Steps to Reproduce:
1. Create a class and a port
2. Create a heir and drag the inherited port to the class.
3. Create a connection between the inherited port and an inner part
Comment 1 Ansgar Radermacher CLA 2010-10-11 10:31:44 EDT
The error is not limited to inherited ports. A connector is also added to the wrong class, if owned ports are connected.
Comment 2 Ansgar Radermacher CLA 2010-10-11 12:07:11 EDT
Created attachment 180608 [details]
First fix

A first patch which works after some testing. Modification: call deduceContainer with the parts with ports (if non null) instead of the ports.
Comment 3 Ansgar Radermacher CLA 2010-10-11 15:04:17 EDT
Created attachment 180615 [details]
Correction of earlier patch

Correction of fix
(copy&paste mistake: targetPartOrRole = target instead of ... = source)
Comment 4 Yann Tanguy CLA 2010-10-15 05:20:34 EDT
*** Bug 326932 has been marked as a duplicate of this bug. ***
Comment 5 Yann Tanguy CLA 2010-10-15 08:38:13 EDT
(r2951)

The GraphNodeEditPolicy used by Port and Property have been modified in order to keep the source / target GraphicalEditPart as request parameters.

During the creation the container of the new Connector is calculated by looking for a StructuredClassifier in graphical containers of the source / target.
The container proposed by source and target should be the same.

Let me know if this is ok for you (you can close the bug if its ok).
Comment 6 Yann Tanguy CLA 2010-10-25 09:14:08 EDT
I close this task, don't hesitate to reopen in case current implementation does not match your expectations.