[438068] Edge Creation Tool creates all edges matching the mapping

Update CreateDEdgeTask to use directly
DDiagramElementSynchronizer.createNewEdge() instead of
DDiagramSynchronizer.createEdgeMapping()

Bug: 438068
Change-Id: I8613e3a5e7521f3652879a89a1eb04c866db0aca
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
[437544] Ignore scroll for border node creation

The border of the parent is always visible...

Bug: 437544
Change-Id: I2b26429c19c7d342297269a4e20f433a7a26a3a1
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Fix bug concerning creation in container

The figure of the container itself is previously ignored in the
shifting. As consequence, there is a difference of 1 pixel in y between
the clicked location and the creation location.

Bug: 435507
Change-Id: I9f112dce0aca07094d523bc7cf7d0ac2d85fd387
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Depreciate disableSnapToGrid() method

Use setSnapToGrid(false) instead.

Bug: 435507
Change-Id: I6f464c1e16fa798be78704720d396e1decc4f0dd
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Consider SnapTo during creation of node or edge.

Bug: 435507
Change-Id: I657bd648a1eaf0e6425fe61fd176c0550321ecda
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Update Spec - Add ref to bugzilla 437544

This is one of bug detected during this feature.

Bug: 435507
Change-Id: I40a92a6baf8c90c80f2efff4623a88378d05c96e
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Update Spec - Add details for edge case

Bug: 435507
Change-Id: I0f3aa17268aed2d0ac9ab0099b9304974a957313
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Change parameter of GraphicalHelper.getZoom

use a parent interface instead.
This commit also contains cleaning of unnecessary cast caused by this
change.

Bug: 435507
Change-Id: I8547fd937a787f2d5cf36d83db31214cebe792e0
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Specific code for edge creation

Bug: 435507
Change-Id: Ief192147897029ac33c0fde63eac9f2b8667452e
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[438354] NPE in WorkspaceImagePathSelector if a file without extension
exists in the workspace

Add a simple !=null 

Bug: 438354
Change-Id: I349e25e8f3a1e9e1d438c21e222af1432c0b4ec3
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
Merge "[438068] Edge Creation Tool creates all edges matching the mapping"
[433821] Completion on Acceleo 3 expressions is not available anymore in
odesign file 

A NPE is thrown on interpreted expression in odesign completion when a
Java extension to an empty Java class is defined. The
CompilationResult.getStatus() returns null. The fix consists to consider
CompilationResult.getStatus()==null as Status.OK in the condition where
there is the NPE.

Bug: 433821
Change-Id: I0d0b340e38a582eef58b57bcaf81771ea32dc2c8
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
[437755] The message "Root element has been deleted..." should not
appeared when the editor is already closed

1. Add a check on DialectEditor to avoid that + do some cleanup
2. Update the IEditingSession.attachEditor()/detachEditor() javadoc to
indicate that a detached editor is equivalent to a closed editor and an
attached editor is equivalent to an opened editor
3. Remove DDiagramEditorImpl.disposeDocumentProvider() as
IEditingSession.detachEditor() is already called in
DDiagramEditorImpl.dispose()

Bug: 437755
Change-Id: Ie8f91412d61ed5a38180f7af3cc2a503b2004e82
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
Merge "[437755] The message "Root element has been deleted..." should not appeared when the editor is already closed"
[435507] Fix default GMF size computation for container

During this feature, a bug on default GMF size computation for container
has been discovered. This problem has been revealed with the use of
NodeQuery.getHandleBounds() in CanonicalDBorderItemLocator. The
getHandleBounds method can be improved by using some magic numbers
defined in AbstractDiagramListEditPart and
AbstractDiagramContainerEditPart. So the code has been refactored to
have this magic numbers accessed by constant
(LayoutUtils.NEW_DEFAULT_CONTAINER_DIMENSION) or by utility method
(DNodeContainerQuery.getDefaultDimension()).

Bug: 435507
Change-Id: Ie7c9a6beaf43d69ca28736fea04fa317acc687db
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Fix border node location

During this feature, a bug concerning border node location has been
discovered. This commit fix this problem by changing the
CanonicalDBorderItemLocator (for GMF location) and the
DBorderItemLocator (for draw2d location). This bug concerns border node
located on the border (like when snapToGrid is enabled and the grid is
on a border of the parent).

Bug: 435507
Change-Id: Id227fbd0876c0fb1ffa4bd2ba5ce86fb947c2218
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[435507] Add utilities methods for tests

* adaptLocationToSnap(Point): To adapt location according to
SnapToHelper of a given editor
* getDiagramEditPart: To retrieve the diagram edit part of a given
editor.

Bug: 435507
Change-Id: Ia485fa3554b7d72571c68198d43d6c782ee26fc5
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
Revert "[438068] Edge Creation Tool creates all edges matching the mapping"

This reverts commit 089dee2107605feca1e518660b6680b22758f2bb.
This commits makes several regressions on SWTBot Sequence tests suite (in SequenceExecutionBasicAndReturnMessageTest for example).
[438691] Add "touched" mode for selection with rectangle

Currently, you can select several elements by using a selection
rectangle. To be selected, an element must be completely contained by
the selection rectangle.

This commit adds a new mode ("touched" mode), in which to be selected,
an element must intersect the selection rectangle.

This new mode will be activated when the user selects elements from
right to left. The current mode remains when the user selects elements
from left to right.

Bug: 438691
Change-Id: I3f376bc9b2292cf56835338c8a3ae9a0140bc74d
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[438691] Move concerned classes in ext.gmf plugin

This classes does not depend on other things than GMF itself, so it has
been moved in ext.gmf plugin.
The ViewportUtilities has also been removed as Sirius is not supposed
to be compatible with Eclipse Helios. This class has been duplicated
because it was not available for 3.5.

Bug: 438691
Change-Id: I5262d76a734906c8e002b216b6c9a474f28b8b0d
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>