Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 497054

Summary: Always authorize "Auto Size" action on regions container
Product: [Modeling] Sirius Reporter: Laurent Redor <laurent.redor>
Component: DiagramAssignee: Laurent Fasani <laurent.fasani>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: laurent.fasani, pierre-charles.david
Version: 4.0.0Keywords: triaged
Target Milestone: 5.1.1   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=526073
https://git.eclipse.org/r/110179
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=f568f7e4a60be596c97b1dba99761663177659d4
https://git.eclipse.org/r/122201
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=152e9bf6165d6971a987fb9a5dbdfb63af5ba97f
Whiteboard:
Attachments:
Description Flags
CompartmentsProject.zip none

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