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

Bug 454014

Summary: Known issues with centered edges
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: DiagramAssignee: Florian Barbin <florian.barbin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: belqassim.djafer, florian.barbin, pierre-charles.david
Version: 2.0.0Keywords: triaged
Target Milestone: 2.0.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 448739    
Bug Blocks:    
Attachments:
Description Flags
NPE on reconnect edge none

Description Pierre-Charles David CLA 2014-12-03 08:50:30 EST
+++ This bug was initially created as a clone of Bug #448739 +++

We still have know issues with Bug 437538:

In the case of auto-size containers, we compute a wrong size in pure GMF coordinate system. That happens with long labels for instance since we do not compute the real label size according to the font name, the font-size, etc.

According to these limitations, we have two identified cases where the edge centering could be wrong:

* When performing an arrange-all (or selection)
* When re-sizing one of the edge ends shape.
Comment 1 Pierre-Charles David CLA 2014-12-03 08:50:55 EST
Cloned from bug 448739 to backport into Sirius 2.0.2.
Comment 2 Florian Barbin CLA 2014-12-10 05:15:30 EST
Backported on branch 2.0.x
Comment 3 Belqassim Djafer CLA 2014-12-15 05:00:19 EST
Created attachment 249424 [details]
NPE on reconnect edge

NPE when reconnect edge, to reproduce :
1- import the attached project
2- Open "new testReconnect" representation
3- try to reconnect the edge2 target from eClass4 to eClass3 -> KO!

The stack : 
Caused by: java.lang.NullPointerException
	at org.eclipse.sirius.diagram.ui.tools.internal.routers.SiriusRectilinearRouter.getAnchorOwnerCenter(SiriusRectilinearRouter.java:89)
	at org.eclipse.sirius.diagram.ui.tools.internal.routers.SiriusRectilinearRouter.handleEdgeCentering(SiriusRectilinearRouter.java:63)
	at org.eclipse.sirius.diagram.ui.tools.internal.routers.SiriusRectilinearRouter.routeLine(SiriusRectilinearRouter.java:37)
	at org.eclipse.gmf.runtime.draw2d.ui.internal.routers.ObliqueRouter.routeBendpoints(ObliqueRouter.java:210)
	at org.eclipse.gmf.runtime.draw2d.ui.internal.routers.ObliqueRouter.route(ObliqueRouter.java:195)
	at org.eclipse.draw2d.PolylineConnection$RoutingNotifier.route(PolylineConnection.java:371)
	at org.eclipse.draw2d.PolylineConnection.layout(PolylineConnection.java:176)
	at org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart$ViewEdgeFigure.layout(AbstractDiagramEdgeEditPart.java:733)
	at org.eclipse.draw2d.Figure.validate(Figure.java:1896)
...
Comment 4 Florian Barbin CLA 2014-12-15 05:26:26 EST
Reopened because of NPE.
Comment 5 Florian Barbin CLA 2014-12-15 05:30:28 EST
A gerrit that fixes this issue: https://git.eclipse.org/r/#/c/38226/
Comment 6 Florian Barbin CLA 2014-12-15 05:40:44 EST
Fixed by 7a63e605330f31a29040485ef93ba374876a9731
Comment 7 Belqassim Djafer CLA 2014-12-15 08:37:58 EST
Validated with Sirius 2.0.2.201412151307
Comment 8 Florian Barbin CLA 2014-12-15 08:42:37 EST
Verified
Comment 9 Pierre-Charles David CLA 2014-12-16 08:34:43 EST
Available in Sirius 2.0.2.