Bug 439361 - Containment arrow is not always displayed on bi-directionnal references with containment
Summary: Containment arrow is not always displayed on bi-directionnal references with ...
Status: RESOLVED FIXED
Alias: None
Product: Ecoretools
Classification: Modeling
Component: General (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P3 normal
Target Milestone: 2.0.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 445224 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-10 11:44 EDT by Maxime Porhel CLA
Modified: 2014-11-03 08:15 EST (History)
2 users (show)

See Also:


Attachments
No diamond arrow for a bi-directionnal reference with containment (2.18 KB, image/png)
2014-07-10 11:44 EDT, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2014-07-10 11:44:19 EDT
Created attachment 244982 [details]
No diamond arrow for a bi-directionnal reference with containment

Steps to reproduce: 
 . Create/Open an Entity diagram
 . Create two classes C1 and then C2
 . Create a standard reference r_1_2 from C1 to C2
 . Create a Containment reference r_2_1 from C2 to C1
 . Set r_1_2 as the opposite of r_2_1 (properties view)
 . Set r_2_1 as the opposite of r_1_2 (properties view)

-> KO : the containment diamond is not displayed.

org.eclipse.emf.ecoretools.design.service.EReferenceServices.getEOppositeEReferences(EPackage, DSemanticDiagram) compute the list of bi-directionnal references. It take the first found EReference of each couple as main ref. 

So regarding the ref order (sorted by EClass and then by containment order in each EClass), the main ref / candidate used to build the DEdge is the containment EReference or the container EReference. 

So a solution is to add a specific StyleCustomization:
 . StyleCustomization feature:container
   . PropertyCustomization (by expr) targetArrow
   . PropertyCustomization (by expr) sizeComputationExpression
Comment 1 Maxime Porhel CLA 2014-07-10 11:58:50 EDT
Another little issue (which could get its own bugzilla, but concerns bi-directionnal edges too). 

The direct edit seems to set the set name for both edge labels, I thing we could try to set first or both : ref1 or ref1 - ref2 for example).
Comment 2 Maxime Porhel CLA 2014-07-22 08:44:24 EDT
See https://git.eclipse.org/r/30243 for the new style customization.
Comment 3 Cedric Brun CLA 2014-08-18 08:14:45 EDT
Thanks for your patch. I just merged it on the 2.0 stream, I will close this bug when it is merged on the master stream too.
Comment 5 Cedric Brun CLA 2014-11-03 08:15:25 EST
*** Bug 445224 has been marked as a duplicate of this bug. ***