Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2014-09-04 09:19:39 +0000
committerLaurent Redor2014-09-05 08:58:31 +0000
commitbe469c7bd6cd33b06751df7ae3ca2fcaac8cf26d (patch)
tree81edba5b045f634cfefa153a957d2815c8c594a0
parent60703001ca29b603b9c531f0b763d9d49062fad7 (diff)
downloadorg.eclipse.sirius-be469c7bd6cd33b06751df7ae3ca2fcaac8cf26d.tar.gz
org.eclipse.sirius-be469c7bd6cd33b06751df7ae3ca2fcaac8cf26d.tar.xz
org.eclipse.sirius-be469c7bd6cd33b06751df7ae3ca2fcaac8cf26d.zip
[431035] Enable snap to shape by default
Bug: 431035 Change-Id: I5538b575accffd0f3b75569656d184847f6a2ed7 Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/preferences/DiagramRulersAndGridPreferencePage.java15
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.html3
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release Notes.textile2
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.html6
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.textile2
5 files changed, 24 insertions, 4 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/preferences/DiagramRulersAndGridPreferencePage.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/preferences/DiagramRulersAndGridPreferencePage.java
index 0977079083..330a9a79bb 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/preferences/DiagramRulersAndGridPreferencePage.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/internal/preferences/DiagramRulersAndGridPreferencePage.java
@@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.sirius.diagram.ui.internal.preferences;
+import org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants;
import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
/**
@@ -19,9 +21,22 @@ import org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin;
public class DiagramRulersAndGridPreferencePage extends RulerGridPreferencePage {
/**
+ * Initializes the default preference values for the preferences (firstly,
+ * the GMF default values and then the Sirius ones to override GMF).
+ *
+ * @param IPreferenceStore
+ * preferences
+ */
+ public static void initDefaults(IPreferenceStore preferenceStore) {
+ RulerGridPreferencePage.initDefaults(preferenceStore);
+ preferenceStore.setDefault(IPreferenceConstants.PREF_SNAP_TO_GEOMETRY, true);
+ }
+
+ /**
* @was-generated
*/
public DiagramRulersAndGridPreferencePage() {
setPreferenceStore(DiagramUIPlugin.getPlugin().getPreferenceStore());
}
+
}
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
index d382a119ff..bec2ddc82a 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.html
@@ -55,6 +55,9 @@
</p>
<ul>
<li>The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the &#171;advance&#187; tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered.</li>
+ <li>The &#171;snap to shapes&#187; is now enabled by default (see
+ <em>Sirius &gt; Sirius Diagram &gt; Rulers and Grid</em> preference page). This is true only for new diagrams. The existing diagrams are not impacted.
+ </li>
</ul>
<h3 id="APIChanges">API 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 ecdfc9213c..9141be354b 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release Notes.textile
@@ -14,8 +14,8 @@ h3. User-Visible Changes
!images/moveNode-edgeImpact-changedBehavior.gif!
* When a node, container or not, is resized to the left, upwards, or both, the location of its children (elements inside a container and border nodes) is not changed. It is possible to retrieve the previous behavior by pressing the F3 function key during the resize.
!images/containerResize-changedBehavior.gif!
-
* The specifier can now choose to hold the edge ends toward the center of the source, target or both. New fields within the "advance" tab of EdgeStyle description have been added to choose for which source or target mappings an edge should be centered.
+* The "snap to shapes" is now enabled by default (see _Sirius > Sirius Diagram > Rulers and Grid_ preference page). This is true only for new diagrams. The existing diagrams are not impacted.
h3. API Changes
diff --git a/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.html b/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.html
index dc1be77987..4d482e1764 100644
--- a/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.html
+++ b/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.html
@@ -76,11 +76,13 @@
</p>
<ol>
<li>Disable the
- <em>Snap to Grid</em> behavior. For an existing diagram, this is available in the
+ <em>Snap to Grid</em> and the
+ <em>Snap to Shapes</em> behaviors. For an existing diagram, this is available in the
<em>Rulers &amp; Grid</em> section of the
<em>Properties</em> view when the diagram itself is selected. You can also disable it for all future diagrams in the preferences:
<em>Sirius &gt; Sirius Diagram &gt; Rulers and Grid</em>, un-check the
- <em>Snap to grid for new diagrams</em> check box.
+ <em>Snap to grid for new diagrams</em> and
+ <em>Snap to shapes for new diagrams</em> check boxes.
</li>
<li>Enable Sirius&#8217;s
<em>Automatic Refresh</em> (in the main
diff --git a/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.textile b/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.textile
index cb9220ca98..1611edad49 100644
--- a/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/user/sequences/Sequence Diagrams.textile
@@ -15,7 +15,7 @@ These diagrams behave mostly like normal Sirius diagrams, but in order to ensure
This document only describes the specificities of sequence diagrams. Unless otherwise stated here, all the features of normal Sirius diagrams apply also to sequence diagrams, so you can refer to "the general diagrams user manual":../diagrams/Diagrams.html for more information.
*IMPORTANT WARNING*: To work correctly, Sirius sequence diagrams must have a tight control on where the graphical elements are placed on the diagram and on their synchronization with the underlying semantic model. This means that to use sequence diagrams you _must_:
-# Disable the _Snap to Grid_ behavior. For an existing diagram, this is available in the _Rulers & Grid_ section of the _Properties_ view when the diagram itself is selected. You can also disable it for all future diagrams in the preferences: _Sirius > Sirius Diagram > Rulers and Grid_, un-check the _Snap to grid for new diagrams_ check box.
+# Disable the _Snap to Grid_ and the _Snap to Shapes_ behaviors. For an existing diagram, this is available in the _Rulers & Grid_ section of the _Properties_ view when the diagram itself is selected. You can also disable it for all future diagrams in the preferences: _Sirius > Sirius Diagram > Rulers and Grid_, un-check the _Snap to grid for new diagrams_ and _Snap to shapes for new diagrams_ check boxes.
# Enable Sirius's _Automatic Refresh_ (in the main _Sirius_ preferences page) to ensure the diagram is always kept in synch with the underlying semantic model.
h2(#semantics). Sequence Diagrams Semantics

Back to the top