Bug 497054 - Always authorize "Auto Size" action on regions container
Summary: Always authorize "Auto Size" action on regions container
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.0.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 5.1.1   Edit
Assignee: Laurent Fasani CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-06-30 03:44 EDT by Laurent Redor CLA
Modified: 2019-01-29 11:17 EST (History)
2 users (show)

See Also:


Attachments
CompartmentsProject.zip (117.88 KB, application/x-zip-compressed)
2017-12-06 05:06 EST, Laurent Redor CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2016-06-30 03:44:32 EDT
Due to specific layout constraint of regions container, the auto-size mechanism is not the same as others kinds of container.
Since Sirius 4.1 (in progress), the region container is considered as auto-sized as soon as it contains at least one region. The size "responsibility" is handled by the regions.
It will be interesting to allow the "Auto Size" if at least one of its regions is not auto-sized.
A first step would be to always autorize "Auto Size" action on regions containers.

Currently, as workaround, the "Auto Size" action can be launched on one of the regions to auto-size all regions.


The feature needs to override the default action (org.eclipse.gmf.runtime.diagram.ui.actions.internal.AutoSizeAction), that is constraint by the {-1, -1} layout constraint.

AutoSizeAction.getCommand(Request)
...
				if (containerWidth.intValue() != -1
						|| containerHeight.intValue() != -1) {
					foundNonAutosizedPart = true;
				}
...
Comment 1 Eclipse Genie CLA 2017-10-17 03:16:37 EDT
New Gerrit change created: https://git.eclipse.org/r/110179
Comment 2 Laurent Redor CLA 2017-12-06 05:06:59 EST
Created attachment 271793 [details]
CompartmentsProject.zip

Steps to validate:
* Import project CompartmentsProject from CompartmentsProject.zip (data from org.eclipse.sirius.tests.unit.diagram.compartment.ICompartmentTests)
* Open diagram HStackDiag
* Select "cl1" from "az"
* Launch action "Auto Size" from tabbar
* --> The container "az" and all its children are reduced (to auto size).
* Undo
* Select "az"
* Launch action "Auto Size" from tabbar
* --> The container "az" and all its children are reduced (to auto size).
Comment 4 Laurent Fasani CLA 2018-01-08 08:06:04 EST
being homologated...
Comment 5 Laurent Fasani CLA 2018-01-08 08:08:32 EST
Validated with Sirius 5.1.1rc2_20180105
Comment 6 Pierre-Charles David CLA 2018-02-01 03:25:45 EST
Available in Sirius 5.1.1. See https://wiki.eclipse.org/Sirius/5.1.1 for details.
Comment 7 Eclipse Genie CLA 2018-05-04 12:02:44 EDT
New Gerrit change created: https://git.eclipse.org/r/122201