[444728] Update test case

Bug: 444728
Change-Id: I354564a45d998527dab181acf751d2029e69063e
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
[437528] Limit the edge draw2d figure usage

* This fix initialy concerns the bug: 444734
* Before this fix we tried to find out the edge figure as possible. But
in the case of a copy-paste layout for instance, the whole layout can be
modified by the command and the edge source and target figures bounds
could be out-of-date.
* We now use the edge figure only for modifications which concern the
edge only, otherwise we use the GMF model.
* Launch the CenterEdgeEndModelChangeOperation during the copy-paste
layout.
* Improve the GMFHelper to take containers insets into account.

Bug: 437528
Change-Id: I7938ffd434f317bb4890af25f76ded4abb5077ec
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
[444734] Test to check the stability of edges after a copy/paste layout

Add a test to check the statibility of the edges after a "Copy/Paste
layout" operation.

Bug: 444734
Change-Id: I344dcc80a138742bda895ad7304036120250694c
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
447242: GMF print dialog is not proposed in 64 bits or on OS other than
windows

Update SiriusEnhancedPrintActionHelper to similar code as original GMF
EnhancedPrintActionHelper that evolved since the duplication. 
The specific SiriusRenderedDiagramPrinter is no longer needed because
the alone "override" method createDiagramEditPart() is no longer exists. 

Bug: 447242
Change-Id: Ic1232745caf60b7c2e751589b7e9b06ca679243e
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
[442289] Add tests for new distribute actions

Bug: 442289
Change-Id: I4cc2659718f3d395ed1dcf56f80da1a7ab2eee52
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[445621] Introduce
ModelAccessor/IMetamodelExtender.eRemoveInverseCrossReferences()

Add ModelAccessor/IMetamodelExtender.eRemoveInverseCrossReferences() to
split the two aspect of an EObject deletion through the eDelete methods:
the removal from its container and the removal of each inverse cross
references.

Bug: 445621
Change-Id: I3f3ca0d43febb2b2dbca648c9fbf0914852be04c
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
[445621] Improve DanglingRefRemovalTrigger behavior

It now avoids to make several eAllContents calls if an element is
already in the changedEObjects.

It does not call modelAccessor.eDelete any more, but
eRemoveInverseCrossReferences instead: we used to fragment the deleted
trees of elements but this creates additional and unneeded REMOVE
notifications.

Bug:445621
Change-Id: I09e643a638449f2183893d4d58c6e3bc8ec5a2c4
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
[445621] Avoid double refresh when no dangling reference is unset.

Do not unset references between detached elements. 
A second refresh will still be triggered when a dangling ref has been
removed.

Bug: 445621
Change-Id: I6b4e14e24f0c41e31f92745ffac060ddea3a4da1
Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
[445195] Fix a wrong initialization of
SetReconnectingConnectionBendpointsCommand

On edge source reconnection, SetReconnectingConnectionBendpointsCommand
was wrongly initialized using target edges instead of source edges.
During execution a Iterables.getOnlyElement wasn't satisfied and caused
a rollback. The reconnection was still working but the undo menu was
deactivated. This regression was discovered by a failure in
BracketEdgeTests.

Bug: 445195
Change-Id: I13d7eb2e1b882250ad6d09531645b3d182a35c70
Signed-off-by: Steve Monnier <steve.monnier@obeo.fr>
[447234] Diagram printing KO for diagram not stored in XMLResource

Instead of using "ViewUtil.getIdStr(diagram)" to get a unique id for a
diagram, use its resource's URI. In addition,
SiriusJPSRenderedDiagramPrinter and SiriusSWTRenderedDiagramPrinter now
have their own method to retreive DiagramEditor instead of calling
"DiagramEditorUtil.findOpenedDiagramEditorForID(ViewUtil.getIdStr(diagram));".
SiriusJPSRenderedDiagramPrinter.run() and
SiriusSWTRenderedDiagramPrinter.run() have been copied from
JPSDiagramPrinter.run() and SWTDiagramPrinter.run() respectively.

Bug: 447234
Change-Id: Ieadfe4b887ff502df956edf52d0bea651bfb316b
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
447242: Add test about GMF diagram print dialog display

Add DiagramPrintTest

Bug: 447242
Change-Id: I6e72270d08789075d81c3240b2c06979fab807e6
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
[test] Fix the problem of 1 pixel delta for testResizingC2ToSWWith50()

Fix the problem of 1 pixel delta on some PC: "The point #0 is different
after resizing:  expected:<Point(229.0, 85.0)> but was:<Point(229.0,
86.0)>"

Cause of problem: At end of method
org.eclipse.gmf.runtime.draw2d.ui.internal.routers.RouterHelper.resetEndPointsToEdge(Connection,
PointList): sourceAnchorPoint is a PrecisionPoint with
preciseX=85.9985xxxx but was rounded to 85. After the resize of the node
the rounded value is 86 and it's "normal".

So the test has been adapted to have a delta of 1 pixel for this failing
case.

Change-Id: Iee75ba96d023c77ced07777d8337c3c0876cf039
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[447559] Add the action to reset container origin

Improve the Bug 444569 to also handle containers.
* Add the existing action within the container context menu
* Add the ResetOriginEditPolicy on AbstractDiagramContainerEditPart
* Adapt the existing code
* Update the user documentation and the release-note.
* Add a test for action on container.

Bug: 447559
Bug: 444569
Change-Id: Ib093b709705225dff9a468383b53c78374aaac81
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[test] Make this test more reliable.

The tests of this class failed randomly with message of kind:
"WidgetNotFoundException: Expected to find widget c1"

as if the semantic modification has not been yet passed to the diagram.

This commit modifies the semantic model with a specific ResourceSet and
by using EMF API instead of using a mixed of UI and API.

Change-Id: I08dc7dc1da0a049d8753fff49fd8d0566f424d6c
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[447042] Stop sending Workspace related events in an async way

When the session is saving, it is waiting for a workspace event related
to the files it just saved and will identify those as "expected", hence
not requiring a resource reload. By sending these events in an async way
we are just adding more entropy in this regard, the session might
retrieve a completely unrelated event and act accordingly.

 
Bug: 447042
Change-Id: I868f807e45e8bc5e749b01469f1b94454b975f81
Signed-off-by: Cedric Brun <cedric.brun@obeo.fr>