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

Bug 481823

Summary: Edge moving error between a node and its container
Product: [Modeling] Sirius Reporter: Julien Dupont <julien.dupont>
Component: DiagramAssignee: Laurent Redor <laurent.redor>
Status: CLOSED FIXED QA Contact: Florian Barbin <florian.barbin>
Severity: major    
Priority: P3 CC: florian.barbin, laurent.redor, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 3.1.3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/60512
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=29d6ba52d0caf4f79fd33a8654f4d68ab162e94b
https://bugs.eclipse.org/bugs/show_bug.cgi?id=482124
Whiteboard:
Bug Depends on:    
Bug Blocks: 482124    
Attachments:
Description Flags
Use case none

Description Julien Dupont CLA 2015-11-10 05:57:53 EST
Created attachment 257845 [details]
Use case

When the edge is references between a container and this node and that the edge's style is Manhattan an error occurred.
To reproduce use the use case attached:
- Open representation
- Try to move the node, the node does not moved and an error occurred
Comment 1 Pierre-Charles David CLA 2015-11-10 08:38:49 EST
Confirmed, here is the error:

eclipse.buildId=unknown
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data /home/pcdavid/p/sirius/wks-luna/../runtime-sirius -dev file:/home/pcdavid/p/sirius/wks-luna/.metadata/.plugins/org.eclipse.pde.core/Sirius/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

org.eclipse.gmf.runtime.diagram.ui
Error
Tue Nov 10 14:38:15 CET 2015
execute

org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:524)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:71)
	at org.eclipse.sirius.diagram.ui.tools.internal.editor.DDiagramCommandStack.execute(DDiagramCommandStack.java:52)
	at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
	at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
	at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
	at org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx.executeCurrentCommand(DragEditPartsTrackerEx.java:151)
	at org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:496)
	at org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:351)
	at org.eclipse.sirius.diagram.ui.tools.internal.ui.SnapToAllDragEditPartsTracker.handleButtonUp(SnapToAllDragEditPartsTracker.java:101)
	at org.eclipse.gef.tools.AbstractTool.mouseMove(AbstractTool.java:1159)
	at org.eclipse.gef.tools.SelectionTool.mouseMove(SelectionTool.java:562)
	at org.eclipse.gef.EditDomain.mouseMove(EditDomain.java:287)
	at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:365)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:543)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:212)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: java.lang.IllegalStateException
	at com.google.common.base.Preconditions.checkState(Preconditions.java:134)
	at org.eclipse.sirius.diagram.ui.internal.edit.parts.locator.EdgeLabelQuery.<init>(EdgeLabelQuery.java:205)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.SetLabelsOffsetOperation.computeGMFLabelOffset(SetLabelsOffsetOperation.java:149)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.SetLabelsOffsetOperation.computeGMFLabelsOffset(SetLabelsOffsetOperation.java:124)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.SetLabelsOffsetOperation.setLabelsToUpdate(SetLabelsOffsetOperation.java:109)
	at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SetConnectionBendpointsAndLabelCommmand.setLabelsToUpdate(SetConnectionBendpointsAndLabelCommmand.java:66)
	at org.eclipse.sirius.diagram.ui.graphical.edit.policies.SetConnectionBendpointsAccordingToExtremityMoveCommmand.setLabelsToUpdate(SetConnectionBendpointsAccordingToExtremityMoveCommmand.java:73)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.ChangeBendpointsOfEdgesCommand.getBendpointsChangedCommand(ChangeBendpointsOfEdgesCommand.java:275)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.ChangeBendpointsOfEdgesCommand.completeCommandWithBendpointsChangedCommand(ChangeBendpointsOfEdgesCommand.java:165)
	at org.eclipse.sirius.diagram.ui.internal.edit.commands.ChangeBendpointsOfEdgesCommand.doExecuteWithResult(ChangeBendpointsOfEdgesCommand.java:120)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.emf.workspace.CompositeEMFOperation.doExecute(CompositeEMFOperation.java:217)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.sirius.diagram.ui.tools.internal.commands.WrappingCommandIgnoringAffectedFiles.execute(WrappingCommandIgnoringAffectedFiles.java:124)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:516)
	... 42 more
Comment 2 Laurent Redor CLA 2015-11-13 12:04:18 EST
The problem seems to be in org.eclipse.sirius.diagram.ui.graphical.edit.policies.SetConnectionBendpointsAccordingToExtremityMoveCommmand.removePointsInViews(PointList, PrecisionRectangle, Point, PrecisionRectangle, Point) that does not correctly handled the case were an edge is between a node and its container.
Comment 3 Eclipse Genie CLA 2015-11-16 09:43:25 EST
New Gerrit change created: https://git.eclipse.org/r/60512
Comment 6 Florian Barbin CLA 2015-11-20 10:15:49 EST
Verified on Sirius 3.1.3.201511201007
Comment 7 Pierre-Charles David CLA 2015-12-15 05:26:23 EST
Available in Sirius 3.1.3 released on 2015-12-08.