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

Bug 501883

Summary: Authorized Sides missing at Conditional Style
Product: [Modeling] Sirius Reporter: Xi Ng <c3567478>
Component: DiagramAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact: Pierre Guilet <pierre.guilet>
Severity: normal    
Priority: P3 CC: laurent.redor, maxime.porhel, steve.monnier
Version: 4.0.0Keywords: triaged
Target Milestone: 4.1.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/81576
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8390245bb2d43d5566597df3f00ab71fdaefbb64
https://git.eclipse.org/r/82950
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=461554e278040d7acafed986b8712c859868ef7e
Whiteboard: backport

Description Xi Ng CLA 2016-09-21 03:35:19 EDT
Hello

When I want to set the layout of a Bordered Node adding a workspace image straight to the Diagram Element (Bordered Node > Workspace Image) I get the following option:
Bordered Node > Properties View > Advanced > Authorized Sides: WEST / SOUTH / EAST / NORTH

This is great! Exactly, what I need.

But when I want want to set the layout of a Bordered Node adding a workspace image to a Conditional Style first (Bordered Node > Conditional Style > Workspace Image)this option of choosing WEST / SOUTH / EAST / NORTH is not there.

But it would be very useful.

I reported this in the Sirius Forum and Maxime Porhel answered: 
"It seems you find a bug [...] I fast checked the code and the bug seems to be present for all kind of node styles, as soon as they are placed in a conditional style."

Thanks
Xing
Comment 1 Eclipse Genie CLA 2016-09-21 08:11:05 EDT
New Gerrit change created: https://git.eclipse.org/r/81576
Comment 2 Maxime Porhel CLA 2016-09-21 09:53:17 EDT
Steps to reproduce: 
 . Get the test data used in org.eclipse.sirius.tests.swtbot.BorderNodeSideTest : http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins/org.eclipse.sirius.tests.swtbot/data/unit/borderNodeSide
 . Open the VSM
 . Select one of the border node mapping
 . Add a conditional style
 . Add a node style (any kind)
 . Check the property sections : KO, no authorized sides property.
This style of a border node mapping the Authorized sides property section should be displayed.




TODO
 . complete the VSM to add a conditional style with some forbidden states
 . complete BorderNodeSideTest to make it checks that specification of the conditional style is well taken into account
 . add a new test (class) to test the forbidden side property section display in VSM editor : border node mapping, node mapping, condition style and workspace image as child of a ContainerMapping. (WorkspaceImageDescription inherit from both NodeStyleDesc and ContainerStyleDesc.
Comment 4 Maxime Porhel CLA 2016-09-23 09:03:27 EDT
Thank you Xi for the detail bug report. 
The issue has been corrected on master for Sirius 4.1. 

I have also tagged it as candidate for backport in case of a future 4.0.x version.
Comment 5 Laurent Redor CLA 2016-10-06 03:13:03 EDT
The tests auto will be made later (the keyword needtest is here to identify this remaining work).
Comment 6 Steve Monnier CLA 2016-10-06 06:05:45 EDT
Validated. The authorized sides property and its checkbox are available on bordered nodes.
Comment 7 Eclipse Genie CLA 2016-10-11 10:14:15 EDT
New Gerrit change created: https://git.eclipse.org/r/82950
Comment 8 Pierre-Charles David CLA 2016-10-18 11:07:11 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.