diff options
| author | Laurent Redor | 2018-01-05 17:27:13 +0000 |
|---|---|---|
| committer | Laurent Redor | 2018-01-09 14:34:33 +0000 |
| commit | 8055fa7f8ff5081303712aed5b5456573735291f (patch) | |
| tree | b24b93a1f386ac8e57e50dcb92747c9e3be603e3 | |
| parent | c6ad4acb0bf9466d94778c9f0e13b42cc0d372fd (diff) | |
| download | org.eclipse.sirius-8055fa7f8ff5081303712aed5b5456573735291f.tar.gz org.eclipse.sirius-8055fa7f8ff5081303712aed5b5456573735291f.tar.xz org.eclipse.sirius-8055fa7f8ff5081303712aed5b5456573735291f.zip | |
[529579] Change behavior of selection by drawing a rectangle
In diagrams, the selection by drawing a rectangle on container, i.e.
with ALT key pressed now has the same behavior as selection by drawing a
rectangle on the diagram's background.
Bug: 529579
Cherry-picked-from: 529536
Change-Id: Ic38420271b3dcee9414d1c2b0bb57fa46a37decc
Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
5 files changed, 11 insertions, 4 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramContainerEditPart.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramContainerEditPart.java index 3d9970a57b..ab391654a3 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramContainerEditPart.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramContainerEditPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 THALES GLOBAL SERVICES and others. + * Copyright (c) 2007, 2018 THALES GLOBAL SERVICES and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,7 +32,6 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.internal.tools.RubberbandDragTracker; import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages; import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest; import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor; @@ -57,6 +56,7 @@ import org.eclipse.sirius.diagram.ui.tools.api.policy.CompoundEditPolicy; import org.eclipse.sirius.diagram.ui.tools.internal.figure.LabelBorderStyleIds; import org.eclipse.sirius.diagram.ui.tools.internal.ui.NoCopyDragEditPartsTrackerEx; import org.eclipse.sirius.ext.base.Option; +import org.eclipse.sirius.ext.gmf.runtime.diagram.ui.tools.RubberbandDragTracker; import org.eclipse.sirius.viewpoint.description.style.LabelBorderStyleDescription; import com.google.common.collect.Iterables; diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html index fb0f16a090..d81f0f09c8 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html @@ -149,6 +149,10 @@ <li><span class="label label-info">Modified</span> The " <em>Make Same Size</em>" action can now be applied on region container. If selected region containers have the same number of regions, the regions will have the same size. If the region container used for reference has more regions than the other(s), the last region of others will have the size of all remaining regions in the one used for reference. </li> + <li><span class="label label-info">Modified</span> In diagrams, the selection by drawing a rectangle on container (using ALT key) now has the same behaviors than selection by drawing a rectangle on the diagram’s background. You can refer to + <em>Selection</em> section of the + <a href="user/diagrams/Diagrams.html#standardToolId">Standard Tools</a> chapter for more details on this tool. + </li> </ul> <h3 id="DeveloperVisibleChanges2">Developer-Visible Changes</h3> <h4 id="Changesinorg.eclipse.sirius">Changes in diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile index 25dcadea8e..db23f36db4 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile @@ -23,6 +23,7 @@ h3. User-Visible Changes * <span class="label label-info">Modified</span> When exporting a diagram as an image, it is now possible to choose an image size level. Before this, a preference called _AutoScale_ was available and when it was enable, the diagram was scaled to the maximum size safely allowed by the system. Now, a new preference named _Size of exported images_ is available in the _Sirius > Sirius Diagram_ preference page and offer this possibility. Setting size to _Max_ generates same diagrams as by using the previous preference _AutoScale_. This can produce image with big size in long generation time. If _Size of exported images_ is set to level _Nominal_, diagram will be exported with nominal size (quality will be lower but export time will be shorter). This new preference allows you to choose the tradeoff you want. The "user documentation ":user/diagrams/Diagrams.html#Exportingimages details this change with an example. * <span class="label label-info">Modified</span> The "_Auto Size_" action can now be applied on region container. Before that, the action was available only for regions. * <span class="label label-info">Modified</span> The "_Make Same Size_" action can now be applied on region container. If selected region containers have the same number of regions, the regions will have the same size. If the region container used for reference has more regions than the other(s), the last region of others will have the size of all remaining regions in the one used for reference. +* <span class="label label-info">Modified</span> In diagrams, the selection by drawing a rectangle on container (using ALT key) now has the same behaviors than selection by drawing a rectangle on the diagram's background. You can refer to _Selection_ section of the "Standard Tools":user/diagrams/Diagrams.html#standardToolId chapter for more details on this tool. h3. Developer-Visible Changes diff --git a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html index c014c5db76..1932386555 100644 --- a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html +++ b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.html @@ -1141,12 +1141,13 @@ <em>selection</em> tool is the default one initially selected when you open a diagram. To select an element on a diagram while this tool is active, simply click on it. To select several elements at the same time, you can either draw a rectangle on the diagram, or click on each element individually while keeping the <em>Ctrl</em> key pressed. When selecting elements which are already selected using this method, by clicking on them or drawing a rectangle around them, they are removed from the selection. You can combine both methods (de/selection by single click or by zone) to build complex selection incrementally by always keeping the <em>Ctrl</em> key pressed. - <br/>The selection of several elements by drawing a rectangle on the diagram has 2 modes: + <br/>The selection of several elements by drawing a rectangle has 2 modes: </p> <ul> <li>Selection from left to right: all the elements completely contained in the rectangle will get selected</li> <li>Selection from right to left: all the elements that intersect the rectangle will get selected</li> </ul> + <p>To allow selection by drawing a rectangle on a container, you must simultaneously press the ALT key (otherwise the container is drag’n’dropped).</p> <p>Selected elements have an outline and anchors drawn on their border. Note that when a selection contains multiple elements, exactly one of them has black selection anchors; the rest have white anchors. The element with the black anchors is called the primary selection, and some tools treat it differently than the others (for example alignment tools).</p> <p> <i>Zoom</i>. Next in the palette come two buttons to control the zoom level of the main diagram area. When the diff --git a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile index b0fcc22bdc..d22736f5a4 100644 --- a/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile +++ b/plugins/org.eclipse.sirius.doc/doc/user/diagrams/Diagrams.textile @@ -777,9 +777,10 @@ A few general tools are available in standard on all Sirius diagrams. They appea !images/palette_tools.png! __Selection__. The _selection_ tool is the default one initially selected when you open a diagram. To select an element on a diagram while this tool is active, simply click on it. To select several elements at the same time, you can either draw a rectangle on the diagram, or click on each element individually while keeping the _Ctrl_ key pressed. When selecting elements which are already selected using this method, by clicking on them or drawing a rectangle around them, they are removed from the selection. You can combine both methods (de/selection by single click or by zone) to build complex selection incrementally by always keeping the _Ctrl_ key pressed. -The selection of several elements by drawing a rectangle on the diagram has 2 modes: +The selection of several elements by drawing a rectangle has 2 modes: * Selection from left to right: all the elements completely contained in the rectangle will get selected * Selection from right to left: all the elements that intersect the rectangle will get selected +To allow selection by drawing a rectangle on a container, you must simultaneously press the ALT key (otherwise the container is drag'n'dropped). Selected elements have an outline and anchors drawn on their border. Note that when a selection contains multiple elements, exactly one of them has black selection anchors; the rest have white anchors. The element with the black anchors is called the primary selection, and some tools treat it differently than the others (for example alignment tools). |
