Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2014-08-22 15:49:30 +0000
committerLaurent Redor2014-09-11 07:53:08 +0000
commit72de0b8f72bd3eb4e9ec82088f8c19ba10830d2b (patch)
treedc180d8c8b5b3f31292ec2fd4ff8026d3a53178e
parentacc9afddc7fca1f24994e62a504067cd0b40a9db (diff)
downloadorg.eclipse.sirius-72de0b8f72bd3eb4e9ec82088f8c19ba10830d2b.tar.gz
org.eclipse.sirius-72de0b8f72bd3eb4e9ec82088f8c19ba10830d2b.tar.xz
org.eclipse.sirius-72de0b8f72bd3eb4e9ec82088f8c19ba10830d2b.zip
[442289] Add spec for distribute actions
Bug: 442289 Change-Id: I07689df0c2b483eafcf0c681fb0d14032344efc5 Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.html1
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.textile120
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCenters.pngbin0 -> 31796 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersHorizontal.pngbin0 -> 366 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersVertical.pngbin0 -> 430 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap.pngbin0 -> 30307 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap2.pngbin0 -> 502555 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapHorizontal.pngbin0 -> 357 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapVertical.pngbin0 -> 399 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState.pngbin0 -> 24885 bytes
-rw-r--r--plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState2.pngbin0 -> 502555 bytes
12 files changed, 122 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
index 49408922e0..6cc228e813 100644
--- a/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.sirius.doc/.settings/org.eclipse.core.resources.prefs
@@ -8,3 +8,4 @@ encoding//doc/specifier/general/Writing_Queries.html=utf-8
encoding//specs/proposal/435507_SnapToGridForCreation/435507.html=utf-8
encoding//specs/proposal/437097-moveEdgeClosestSegmentWhenMovingNode/437097-moveEdgeClosestSegmentWhenMovingNode.html=utf-8
encoding//specs/proposal/441090_ResizeNodeWithoutModifyingContainedElementsLocation/441090.html=utf-8
+encoding//specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.html=utf-8
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.html b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.html
new file mode 100644
index 0000000000..37144a8106
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.html
@@ -0,0 +1 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Distributeshapesactionsindiagram">Distribute shapes actions in diagram</h1><h2 id="Preamble">Preamble</h2><p><em>Summary</em>: Add distribute shapes actions in diagram</p><table><tr><th>Version </th><th>Status </th><th>Date </th><th>Authors </th><th>Changes </th></tr><tr><td>v0.2 </td><td>DRAFT </td><td>2014-09-08 </td><td>lredor </td><td>Initial version. </td></tr><tr><td>v0.3 </td><td>PROPOSAL </td><td>2014-09-10 </td><td>lredor </td><td>Team review. </td></tr></table><p><em>Relevant tickets</em> :</p><ul><li><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=442289">442289, Distribute shapes</a></li></ul><h2 id="Introduction">Introduction</h2><p>Distribute actions are often available in graphical/drawing soft (<a href="https://help.libreoffice.org/Common/Distribution">LibreOffice</a> , <a href="http://en.flossmanuals.net/inkscape/positioning-objects/align-and-distribute">Inskape</a> , <a href="http://office.microsoft.com/en-gb/visio-help/distribute-shapes-HP001231368.aspx">Visio</a> , ...). This kind of actions is very useful and misses in Sirius.<br/>The goal of this feature is to remedy this problem.</p><p>4 new actions allowing to distribute shapes will be added:</p><ul><li><ul><li>Distribute centers evenly horizontally <img border="0" src="images/distributeCentersHorizontal.png"/></li><li>Distribute with uniform gaps horizontally <img border="0" src="images/distributeWithUniformGapHorizontal.png"/></li><li>Distribute centers evenly vertically <img border="0" src="images/distributeCentersVertical.png"/></li><li>Distribute with uniform gaps vertically <img border="0" src="images/distributeWithUniformGapVertical.png"/></li></ul></li></ul><h2 id="DetailedSpecification">Detailed Specification</h2><p>These actions will be available in the tabbar in a drop down menu similar to and located after the <em>Align</em> actions menu. The default action of this drop down menu will be <em>Distribute Horizontally With Uniform Gaps</em>.<br/>They will also be in the <em>Diagram</em> menu from the Eclipse menu bar and in the contextual <em>Format</em> menu when diagram elements are selected.<br/>They will be enabled only for selected nodes with same direct parent. At least 3 shapes should be selected to enable distribute actions.<br/>For border nodes, they will be enabled only if all selected border nodes have the same parent and are on the same axis (top and bottom sides for horizontal actions, left and right for vertical actions). The overlap is forbidden for border nodes, so in some conditions (location already used), these actions may not have accurate results.</p><p>For all actions, the first and the last shapes do not move.</p><h3 id="Firstandlastshapes">First and last shapes</h3><p>The first and last shapes do not depend on the selection order. They depend on the location of each selected shapes and the chosen action.</p><p>For horizontal distribution with uniform gaps:</p><ul><li>the first shape is the leftmost one (with the minimum x location). If several shapes have the same x location, the highest one is the first.</li><li>the last shape is the rightmost one (with the right side with the maximum x coordinate). If several shapes are aligned to the right, the lowest one is the last.</li></ul><p>For horizontal centered distribution:</p><ul><li>the first shape is the leftmost one (with its center at the minimum x coordinate). If several shapes are aligned on center, the one with the highest center is the first.</li><li>the last shape is the rightmost one (with its center at the maximum x coordinate). If several shapes are aligned by center, the one with the lowest center is the last.</li></ul><p>For vertical distribution with uniform gaps:</p><ul><li>the first shape is the highest one (with the minimum y location). If several shapes have the same y location, the leftmost one is the first.</li><li>the last shape is the lowest one (with the bottom side with the maximum y coordinate). If several shapes are aligned to the bottom, the rightmost one is the last.</li></ul><p>For vertical centered distribution:</p><ul><li>the first shape is the highest one (with its center at the minimum y coordinate). If several shapes are aligned on middle, the leftmost one is the first.</li><li>the last shape is the lowest one (with the bottom side with the maximum y coordinate). If several shapes are aligned by middle, the rightmost one is the last.</li></ul><p>Information: When speaking above of the right or the bottom side, the border nodes of a shape are ignored.</p><h3 id="Distributecentersevenly">Distribute centers evenly</h3><p>With this action, the gap between centers of each selected shapes will be the same.</p><p>Initial state<br/><img border="0" src="images/initialState.png"/></p><p>Result after having launched the <em>distribute centers evenly horizontally</em> action<br/><img border="0" src="images/distributeCenters.png"/></p><h3 id="Distributewithuniformgaps">Distribute with uniform gaps</h3><p>With this action, the gap between the left side and the right side of each consecutive shapes will be the same.</p><p>Result after having launched the <em>distribute with uniform gaps horizontally</em> action (from the same initial state)<br/><img border="0" src="images/distributeWithUniformGap.png"/></p><h3 id="Overlap">Overlap</h3><p>Overlap could happen, or in other words, the gap can be negative.</p><p>Initial state<br/><img border="0" src="images/initialState2.png"/></p><p>Result after after having launched the <em>distribute with uniform gaps horizontally</em> action<br/><img border="0" src="images/distributeWithUniformGap2.png"/></p><h3 id="Sequencediagram">Sequence diagram</h3><p>These actions are not enabled on sequence diagrams. The layout, and hence the gaps between objects, are conditioned by the model itself.</p><h3 id="Pinstatus">Pin status</h3><p>If the preference <em>Sirius/Sirius Diagram/Automatically mark moved elements as pinned</em> is checked, these actions have no effect on pin status (as for existing align actions).</p><h2 id="BackwardCompatibilityandMigrationPaths">Backward Compatibility and Migration Paths</h2><h3 id="MetamodelChanges">Metamodel Changes</h3><p>No metammodel changes.</p><h3 id="APIChanges">API Changes</h3><p>There will be no change in existing API.</p><h3 id="UserInterfaceChanges">User Interface Changes</h3><p>A new drop down menu will be added to the diagram editor toolbar.<br/>The <em>Diagram</em> menu from Eclipse menu bar and the contextual <em>Format</em> menu will be completed with the new actions.</p><h3 id="DocumentationChanges">Documentation Changes</h3><p>Diagram editor documentation will be updated to describe these new actions.</p><h2 id="TestsandNonregressionstrategy">Tests and Non-regression strategy</h2><p>At least one test for each added action.<br/>At least one of them with zoom and scroll-bar.<br/>One test with negative gap.<br/>One test with 2 shapes at same axis (top, bottom, middle, left, right, center according to action launched) to check first and last shape computing<br/>Several tests for disablement checking: 2 shapes selected, several shapes not at same level, border nodes not on same side.</p><h2 id="Implementationchoicesandtradeoffs">Implementation choices and tradeoffs</h2><p>These actions could be contributed to GMF through <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=290898">https://bugs.eclipse.org/bugs/show_bug.cgi?id=290898</a></p></body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.textile b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.textile
new file mode 100644
index 0000000000..9f6f1e27b0
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/442289_DistributeShapesActions.textile
@@ -0,0 +1,120 @@
+h1. Distribute shapes actions in diagram
+
+h2. Preamble
+
+_Summary_: Add distribute shapes actions in diagram
+
+|_. Version |_. Status |_. Date |_. Authors |_. Changes |
+| v0.2 | DRAFT | 2014-09-08 | lredor | Initial version. |
+| v0.3 | PROPOSAL | 2014-09-10 | lredor | Team review. |
+
+_Relevant tickets_ :
+* "442289, Distribute shapes":https://bugs.eclipse.org/bugs/show_bug.cgi?id=442289
+
+h2. Introduction
+
+Distribute actions are often available in graphical/drawing soft ("LibreOffice":https://help.libreoffice.org/Common/Distribution , "Inskape":http://en.flossmanuals.net/inkscape/positioning-objects/align-and-distribute , "Visio":http://office.microsoft.com/en-gb/visio-help/distribute-shapes-HP001231368.aspx , ...). This kind of actions is very useful and misses in Sirius.
+The goal of this feature is to remedy this problem.
+
+4 new actions allowing to distribute shapes will be added:
+** Distribute centers evenly horizontally !images/distributeCentersHorizontal.png!
+** Distribute with uniform gaps horizontally !images/distributeWithUniformGapHorizontal.png!
+** Distribute centers evenly vertically !images/distributeCentersVertical.png!
+** Distribute with uniform gaps vertically !images/distributeWithUniformGapVertical.png!
+
+h2. Detailed Specification
+
+These actions will be available in the tabbar in a drop down menu similar to and located after the _Align_ actions menu. The default action of this drop down menu will be _Distribute Horizontally With Uniform Gaps_.
+They will also be in the _Diagram_ menu from the Eclipse menu bar and in the contextual _Format_ menu when diagram elements are selected.
+They will be enabled only for selected nodes with same direct parent. At least 3 shapes should be selected to enable distribute actions.
+For border nodes, they will be enabled only if all selected border nodes have the same parent and are on the same axis (top and bottom sides for horizontal actions, left and right for vertical actions). The overlap is forbidden for border nodes, so in some conditions (location already used), these actions may not have accurate results.
+
+For all actions, the first and the last shapes do not move.
+
+h3. First and last shapes
+
+The first and last shapes do not depend on the selection order. They depend on the location of each selected shapes and the chosen action.
+
+For horizontal distribution with uniform gaps:
+* the first shape is the leftmost one (with the minimum x location). If several shapes have the same x location, the highest one is the first.
+* the last shape is the rightmost one (with the right side with the maximum x coordinate). If several shapes are aligned to the right, the lowest one is the last.
+
+For horizontal centered distribution:
+* the first shape is the leftmost one (with its center at the minimum x coordinate). If several shapes are aligned on center, the one with the highest center is the first.
+* the last shape is the rightmost one (with its center at the maximum x coordinate). If several shapes are aligned by center, the one with the lowest center is the last.
+
+For vertical distribution with uniform gaps:
+* the first shape is the highest one (with the minimum y location). If several shapes have the same y location, the leftmost one is the first.
+* the last shape is the lowest one (with the bottom side with the maximum y coordinate). If several shapes are aligned to the bottom, the rightmost one is the last.
+
+For vertical centered distribution:
+* the first shape is the highest one (with its center at the minimum y coordinate). If several shapes are aligned on middle, the leftmost one is the first.
+* the last shape is the lowest one (with the bottom side with the maximum y coordinate). If several shapes are aligned by middle, the rightmost one is the last.
+
+Information: When speaking above of the right or the bottom side, the border nodes of a shape are ignored.
+
+h3. Distribute centers evenly
+
+With this action, the gap between centers of each selected shapes will be the same.
+
+Initial state
+!images/initialState.png!
+
+Result after having launched the _distribute centers evenly horizontally_ action
+!images/distributeCenters.png!
+
+h3. Distribute with uniform gaps
+
+With this action, the gap between the left side and the right side of each consecutive shapes will be the same.
+
+Result after having launched the _distribute with uniform gaps horizontally_ action (from the same initial state)
+!images/distributeWithUniformGap.png!
+
+h3. Overlap
+
+Overlap could happen, or in other words, the gap can be negative.
+
+Initial state
+!images/initialState2.png!
+
+Result after after having launched the _distribute with uniform gaps horizontally_ action
+!images/distributeWithUniformGap2.png!
+
+h3. Sequence diagram
+
+These actions are not enabled on sequence diagrams. The layout, and hence the gaps between objects, are conditioned by the model itself.
+
+h3. Pin status
+
+If the preference _Sirius/Sirius Diagram/Automatically mark moved elements as pinned_ is checked, these actions have no effect on pin status (as for existing align actions).
+
+h2. Backward Compatibility and Migration Paths
+
+h3. Metamodel Changes
+
+No metammodel changes.
+
+h3. API Changes
+
+There will be no change in existing API.
+
+h3. User Interface Changes
+
+A new drop down menu will be added to the diagram editor toolbar.
+The _Diagram_ menu from Eclipse menu bar and the contextual _Format_ menu will be completed with the new actions.
+
+h3. Documentation Changes
+
+Diagram editor documentation will be updated to describe these new actions.
+
+h2. Tests and Non-regression strategy
+
+At least one test for each added action.
+At least one of them with zoom and scroll-bar.
+One test with negative gap.
+One test with 2 shapes at same axis (top, bottom, middle, left, right, center according to action launched) to check first and last shape computing
+Several tests for disablement checking: 2 shapes selected, several shapes not at same level, border nodes not on same side.
+
+h2. Implementation choices and tradeoffs
+
+These actions could be contributed to GMF through "https://bugs.eclipse.org/bugs/show_bug.cgi?id=290898":https://bugs.eclipse.org/bugs/show_bug.cgi?id=290898
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCenters.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCenters.png
new file mode 100644
index 0000000000..ed0959c7b9
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCenters.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersHorizontal.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersHorizontal.png
new file mode 100644
index 0000000000..86feda6f50
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersHorizontal.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersVertical.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersVertical.png
new file mode 100644
index 0000000000..09ea18beb1
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeCentersVertical.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap.png
new file mode 100644
index 0000000000..09f064f17f
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap2.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap2.png
new file mode 100644
index 0000000000..7254969c2b
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGap2.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapHorizontal.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapHorizontal.png
new file mode 100644
index 0000000000..76e828d74d
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapHorizontal.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapVertical.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapVertical.png
new file mode 100644
index 0000000000..58e6abebaa
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/distributeWithUniformGapVertical.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState.png
new file mode 100644
index 0000000000..f84ebb66bc
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState.png
Binary files differ
diff --git a/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState2.png b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState2.png
new file mode 100644
index 0000000000..f71643b95a
--- /dev/null
+++ b/plugins/org.eclipse.sirius.doc/specs/proposal/442289_DistributeShapesActions/images/initialState2.png
Binary files differ

Back to the top