Bug 465211 - Allow container without border
Summary: Allow container without border
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.9   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.1.0   Edit
Assignee: Laurent Redor CLA
QA Contact: Julien Dupont CLA
URL:
Whiteboard:
Keywords: triaged
Depends on: 468038
Blocks: 479419 481119 481836
  Show dependency tree
 
Reported: 2015-04-22 11:18 EDT by Laurent Redor CLA
Modified: 2015-11-10 08:28 EST (History)
3 users (show)

See Also:


Attachments
ContainerBorderSizeUseCase.zip (4.99 KB, application/zip)
2015-04-22 12:14 EDT, 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 2015-04-22 11:18:46 EDT
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.
Comment 1 Laurent Redor CLA 2015-04-22 11:54:33 EDT
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)
Comment 2 Laurent Redor CLA 2015-04-22 12:14:00 EDT
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"
Comment 3 Eclipse Genie CLA 2015-04-22 12:18:30 EDT
New Gerrit change created: https://git.eclipse.org/r/46269
Comment 4 Laurent Redor CLA 2015-04-23 03:22:38 EDT
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)
Comment 5 Eclipse Genie CLA 2015-07-06 05:27:04 EDT
New Gerrit change created: https://git.eclipse.org/r/51403
Comment 7 Laurent Redor CLA 2015-07-10 11:07:05 EDT
Fixed with above commit
Comment 9 Florian Barbin CLA 2015-09-21 10:46:35 EDT
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
Comment 10 Maxime Porhel CLA 2015-09-21 11:33:48 EDT
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
Comment 11 Laurent Redor CLA 2015-09-30 10:45:18 EDT
Finally, the problem is not really linked to ths issue. So I resloved this issue again (without change)
Comment 12 Pierre-Charles David CLA 2015-10-16 09:12:46 EDT
Available in Sirius 3.1.0.