Community
Participate
Working Groups
Currently, for historical reasons, when the border size computation expression of a container returns 0, the real container border size is of 1 pixel. The goal of this issue is to allow container without border (border size of 0 pixel), as this is possible for node. It can be usefull for container represented with image for example.
This requires to: * Change the default value of border size computation expression for the container style description. Currently, the default value is "0" in the metamodel. It can not be changed directly in the metamodel because this value is still OK for the node style. * A VSM migration to replace all 0 default values of the borderSizeComputationExpression of ContainerStyleDescription by 1 (the value really interpreted before): ** FlatContainerStyleDescription and ShapeContainerStyleDescription ** WorkspaceImageDescription (only if it is a style of a ContainerNode) * An aird migration to replace all 0 default values of the borderSize of ContainerStyle by 1 (the value really interpreted before), and also the duplicated borderSizeComputationExpression * Test creation location of a node inside a container without border (check that the location is not wrongly shift by one pixel) * Test creation location of a border node on a container without border (check that the location is not wrongly shift by one pixel)
Created attachment 252639 [details] ContainerBorderSizeUseCase.zip Steps to reproduce: * Import project ContainerWithBorder * Open the diagram newDiag --> Container "0" and "image0" should not have a red border --> ListContainer "0" and "image0" should not have a red border Currently, the border is the same for "0" and "1", and for "image0" and "image1"
New Gerrit change created: https://git.eclipse.org/r/46269
The above gerrit is a POC. It reveals some problemd to check (detected by gerrit): 15 failures * org.eclipse.sirius.tests.swtbot.GroupElementsInOneOtherTestsWith200PercentOfZoomTests.testGroupActionInDiagramEditPartWithoutScroll * org.eclipse.sirius.tests.unit.common.migration.DiagramMigrationTestCampaign09.testEdgeLayout[3] * org.eclipse.sirius.tests.unit.common.migration.DiagramMigrationTestCampaign09.testEdgeLayout[4] * org.eclipse.sirius.tests.unit.common.migration.DiagramMigrationTestCampaign09.testEdgeLayout[6] * org.eclipse.sirius.tests.unit.diagram.layout.data.LabelPositionOnContainerAndListTest.testLabelPositionOnCreation * org.eclipse.sirius.tests.unit.diagram.layout.data.LabelPositionOnContainerAndListTest.testLabelPositionOnDiagramOpening * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[0] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[1] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[2] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[3] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[4] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[5] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[18] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[19] * org.eclipse.sirius.tests.unit.diagram.layout.data.SiriusLayoutDataManagerForSemanticElementsStoreWithPredefinedDataTest.testStoreLayoutAgainstPredefinedData[20] In addition to what has been said in the comment 1, there are other tests to do: * Drag'n'drop of a node (and a border node) in a container without border (check that the dropped location is not wrongly shift by one pixel) * Move a node (and a border node) in a container without border (check that the moved location is not wrongly shift by one pixel)
New Gerrit change created: https://git.eclipse.org/r/51403
Gerrit change https://git.eclipse.org/r/51403 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=dbecde152cd2c577da12be3ec6f4211c4e3c9649
Fixed with above commit
Gerrit change https://git.eclipse.org/r/52054 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4762845e28fc0cf43ddf139c8369cbf103c0dbe8
Import the given use case. Modify the VSM and set Border Size Computation Expression to '0' for both container and list container workspace images 'image0'. Open the diagram, refresh it, the image0 border is style set to 1 px in the DDiagramelement style. => KO
This issue is blocked by Bug 468038. Technically, the 0 pix border works on WorkspaceImage is ok: . Open the attached test case . Remove the modeling project nature . Open the VSM, make a dummy change and save . Open the aird and the diagram . Modify the VSM image0 style border sizes to 0 . The corresponding border now have a 0 pix border. But this issue will be closed when Bug 468038 will be corrected
Finally, the problem is not really linked to ths issue. So I resloved this issue again (without change)
Available in Sirius 3.1.0.