[442198] Add a confirmation dialog when deleting a representation

Bug: 442198
Change-Id: I52dfad9117637166336381c01be294b29a9d9424
Signed-off-by: Belqassim Djafer <belqassim.djafer@obeo.fr>
[428756] Improve tree refresh algorithm

We have performance issue on tree editor in manual refresh.
We have performance issue on 2 cases :

1. On expand, because in DTreeViewerListener we execute a
TreeFoldingRecordingCommand which refreshes all the subtrees of the
expanded DTreeItem even for DTreeItem contained in a collapsed
DTreeItem.
In addition if we are in auto refresh or in manual, when the tree is
expanded or collapsed, we call always RefreshTreeElementTask which
refreshes the expanded
DTreeItem, this is not done by the TreeFoldingRecordingCommand which
refreshes only the subtree. RefreshTreeElementTask also refreshes the
style
of all expanded sub trees items in case of expanded DTreeItem, and
refreshes
all the DTree in case of expand of DTree.

Note that RefreshTreeElementTask which is executed in a SiriusCommand
executes RefreshRepresentationsCommand/RefreshTreeElementCommand in a
CommandStack which makes no sense.

2. On item creation, as for TreeItem expansion, DTreeRefresh refresh all
the subtree
even for DTreeItem contained in a collapsed DTreeItem.

3 changes in the patch:
1. org.eclipse.sirius.synchronizer.CreatedOutput.synchronizeChildren()
method added to know if we must refresh the subtree of a
DTreeItemContainer, this allows to do lazy refresh for collapsed
DTreeItem. But to have DTreeContentProvider.hasChildren() returning true
for container having children not yet created, we create only one
children, without refreshing it as it will be refreshed when user will
expand the DTreeContainer containing it.
2. TreeItemContainerChildSupport.reorderChilds() changed to not call
ECollections.sort() when there is only one mapping in place.
3. DTreeViewerListener.treeExpanded() changed to not use
RefreshTreeElementTask when we are in auto-refresh.

To leave the opportunity to do a full refresh without lazy we add a
boolean to the Sirius refresh api to allow to do it.

Bug: 428756
Change-Id: I1b9a03d5250060611c2ddc012d1310999a3f4c8e
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
Merge "[442198] Add a confirmation dialog when deleting a representation"
[427247] The commit 447cbd2 has introduced a regression that causes NPE

In DnDTasksOperations.createDropinForNodeTask(DragAndDropTarget,
NodeMapping, DDiagramElement, EObject, EObject, boolean), the inlining
of NodeMapping.createListElement() uses the DDiagramElement instead of
the semantic element. When doing a drag'n'drop of a semantic element
from the model explorer view, this can cause a NPE.

Bug: 427247
Change-Id: Ib1f0f813e49d52eb7f75cf42389159d15d81c848
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
[437095] Add bendpoint move condition

Add condition that waits until a specific bendpoint has been moved.

Bug: 437095
Change-Id: I1c36102a6dcdf3700f6fe22b8097bb07b1dc1221
Signed-off-by: Belqassim Djafer <belqassim.djafer@obeo.fr>
[441424] Modify the new Anchor calculation for more precision.

* Complete the release note.

Bug: 441424
Change-Id: I206a2bcd7c37d3b20131a349735eab4658246d36
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
[441424] Add the behavior when resizing a Border Node.

* Call the ShiftEdgeIdentityAnchorOperation within the getResizeCommand
to hold the edges location when resizing a border node.
* This part was missed within the commit
afb566cab0c9c00b90284b05150876135c88c02f

Bug: 441424
Change-Id: I825ca6a2f2e011c9f8df83cc8fd03e6baed2745d
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
[437528] Fix wrong rectilinear bendpoints at opening.

* In some cases, the GMF bendpoints coordinates can be very far away
from the ones
displayed by Draw2D, especially when there are only two bendpoints(they
are always connected to the source and target figure, so the shift is
not visible). If the edge
centering property changes at opening and the edge is rectilinear, we
compute its rectilinear bounds from the GMF information (since we don't
have the figure yet) to center the last segment toward the node center.
This fix prevents wrong rectilinear bounds by
computing them from the GMF bounds of source and target nodes.

Bug: 437528
Change-Id: If6303994539eb896864ee7fc6ff6fd8db3af22da
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
[437528] Fix wrong centering behavior when moving toward node corner.

* In some cases, when moving an edge connection toward the top-left
corner for instance, the edge orientation was badly computed (from north
instead of west in this case) and the edge could appear toward the node
top-left corner instead of the center.

Bug: 437528
Change-Id: Id3b4ffdd8615935c0f831dc16d11591219682acb
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
[428756] update TreeUIHelper.toContentHTMl() about  behavior change

Now that tree refresh is lazy, i.e. not done for children of collapsed
DTreeItem, then code calling "TreeUIHelper.toContentHTMl()" must call a
full refresh to have a complete HTML.
In addition move DTreeViewerListener$TreeFoldingRecordingCommand from
tree.ui plugin to
org.eclipse.sirius.tree.business.api.command.DTreeItemExpansionChangeCommand
in tree plugin to have DnD tree tests call it to be able to expand a
DTreeItem in which a drop has been done.

Bug: 428756
Change-Id: Ide62390144f2cc0d240c87435b4e03cf2acd0503
Signed-off-by: Esteban Dugueperoux <esteban.dugueperoux@obeo.fr>
[442337] Modify the SiriusCommonContentProvider not to rely on
SessionListener.REPRESENTATION_CHANGE events

This allows to avoid issues when the RepresentationChangeListener in
charge of sending SessionListener.REPRESENTATION_CHANGE events is
installed before the CrossReferencerAdapter (and hence trigger the
viewer refresh before CrossReferencer is correctly updated) 

Bug: 442337
Change-Id: I111064cee32b237ec19450ddea99d5f3ab7c1c20
Signed-off-by: Alex Lagarde <alex.lagarde@obeo.fr>
[443592] Fix ViewpointSelectionDialog to handle viewpoints deselection

Fix the method "selectViewpoint(Set<String>, Set<String>)" of the
SWTBot class "ViewpointSelectionDialog" to handle viewpoints
deselection.

Add the internal ViewpointSelectionDialog in order to process the
"Viewpoint Selection" dialog. This class allows the SWTBot class to
check or uncheck any viewpoint.

Bug: 443592
Change-Id: I9ed1c615fc12ebb9710b6754f0784da269921f81
Signed-off-by: Mickael LANOE <mickael.lanoe@obeo.fr>
[cleanup] Remove unused utility methods

Change-Id: Ided639388e50819180c400f3d5c8a7d8df40ae8d
Signed-off-by: Alex Lagarde <alex.lagarde@obeo.fr>
Fix some JDT and CheckStyle warnings

Change-Id: I3bad5672f82d261747dcb42cf2f82fd068fc66fb