Community
Participate
Working Groups
Steps to reproduce: * With * Sirius 7.0.x or 7.1.x * With BPMN Designer (https://github.com/ObeoNetwork/BPMN-Designer) * Import the Travel Agency sample * Case #1 * Create a Collaboration diagram * Select the tool "Participant et un processus existant" * Single click on the diagram * Select "Travel Agency" in the wizard. * Layout "KO" : * Region content is centered, * RegionContainer notation node is in auto-size but but figure has the default dimension * Layout is not stable (Figure are well auto-sized) after a close/reopen diagram (or addition of a new child in the Region) * Case #2 * From previous diagram * Select the particpant, unset its process from the properties views * Check that the participant is in auto-size and emtpy on the diagram * Layout "KO" : * RegionContainer notation node is in auto-size but but figure has the default dimension * Layout is not stable (Figure are well auto-sized) after a close/reopen diagram (or addition of a new child in the Region) * Case #3 * Create a new Collaboration diagram * Layout OK: Participant is created with Region content layouted, RegionContainer layout is stable and correctly auto-sized. * Case #4 * From any previous case, * Move nodes inside the region to right or bottom * Scroll bars appears * Close and reopen the diagram : no more scrollbars and figure are correctly resized. * Layout KO: in auto-size, the RegionContainer should adapt its size to the Region contents.
Note: - Single click creation : - clicked location used as hint to place the created node. - Created container in auto size. - click and drag creation : - first click location used as hint to place the node - drawn rectangle used as hint for the created node/container bounds : fixed size
Created attachment 289108 [details] Case 4
Created attachment 289109 [details] Cases 1, 2, 3
Three proposed fixes for 7.0.8 - disabled by default but activable with system properties
Do not apply center layout on Region content at creation time System property to enable the behavior: -Dorg.eclipse.sirius.diagram.ui.internal.region.content.canonical.layout.standard=true When the Region is created in the same operation, it will be layouted in its RegionContainer. If the regions container is created it will be centered or placed where the user clicked. The goal of the "centered" layout is to regroup "externally" created views (by the precommit canonical refresh) when they have no location hint in the SiriusDataLayoutManager. This is done to ease the retrieval of such elements created as secondary effect of a user action. The main created view would take the clicked location as hint. This seems to be unnecessary when there are several level of created views. The top level created elements will be centered, but centering their center can appear to require more layout work by the user than a first default arrange. This also allows to have a consistent layout for those elements compared to a diagram creation.
(In reply to Maxime Porhel from comment #5) https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/202597 [582089] Do not apply center layout on Region content at creation time
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/202598 Use model constraint to layout Regions System property to enable the behavior: -Dorg.eclipse.sirius.diagram.ui.internal.region.autosize.figure.optimized=true We use to store the computed constraint during layout, but this make the figures unable to adapt their size to the content in auto-size. Behavior is wrong for the user: if he close and reopen the diagram (or do some undo redo, or add new content) : the layout changes.
https://git.eclipse.org/r/c/sirius/org.eclipse.sirius/+/202599 Enable individual auto-size action and status for Regions System property to enable the behavior: -Dorg.eclipse.sirius.diagram.ui.internal.region.autosize.action.optimized=true When auto-size is called on RegionContainer : it put all regions in auto-size. When auto-size is called on a single regions (or selected regions), it enables auto-size for the selection. Without the system preference: no individual status.action, everything is delegated to the RC.
Video to show auto-size pathes effect: https://www.youtube.com/watch?v=_pyhCiSK-V8 (created content was still centered for this video)
Steps to validates * Replay cases #1
Steps to validate - Replay cases #1 and #2 - check that the RegionContainer layout and the region content layout are the same than case #3 - le location of the RegionContainer depends the click location - close and reopen diagram: no change - Case #4: - from a diagram in auto-size: move region content to the right or bottom : size of the Region container self adapts. Close and open the diagram : layout is stabme - if you move sub node to the top or left : you will have scroll bars, as in standard containers. Not in the scope of this ticket. - auto-size action: - open the process definition table - add a new process - create a new process diagram - the process is in auto-size (with sized defined in the VSM) - add a 2 additional new Lane/Corridor in the process - each newly created region has a fixed size (auto-size icon enabled in tabbar on seletion), the RC too. - check that clicking on autosize of a single region affects only this region - manually resize the RC (width) and each regions - auto-size action on the RC : all region are sized to the creation size, auto-size action is grayed for all region and RC - undo : auto-size action is enabled on all regions and RC - auto-size one regions: widht is auto-sized for all regions, they key their fixed height excepted for the selected region.
Verified on Sirius 7.0.8 build deployed with activation of the three properties.
Available in Sirius Desktop 7.0.8: https://projects.eclipse.org/projects/modeling.sirius/releases/sirius-desktop-7.0.8