Community
Participate
Working Groups
Created attachment 240198 [details] Example viewpoint specification project On a container mapping, delete default contents in "Border Size Computation Expression" : - validation is OK - when trying to create a diagram, a NullPointerException is thrown. Steps to reproduce : - import the provided viewpoint specification project - create a diagram on the root EPackage of model 'model/My.ecore'
Issue reproduced with Sirius 1.0 M5 Setting a Border Size Computation Expression allows to avoid the exception
Then the validation should not be OK when this field is not specified.
A null/empty border size computation expression should lead to a 0 (or 1 regarding the current styles behaviors) pixel margin.
I see two area requiring corrections: . VSM editor: . validation rule to check that no border expression is null (could be generalized to all interpreted expression) . customize the border size expr property section to replace a null value by the default MM value (0) during edition . Sirius core: . clean the actual code (see borderStyle/BorderStyleDescription#getBordersizeExpression call) and try to remove duplicated code . correctly handle the empty/null expression by setting the default style value and never null.
I propose the fix : https://git.eclipse.org/r/#/c/36900/
Fixed by 5d8d34ffaeeb8408bfc1715481c9b83943da1478.
New Gerrit change created: https://git.eclipse.org/r/44505
Gerrit change https://git.eclipse.org/r/44505 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=8747a7775da6dcea7c078985ac49f288c672c041
New Gerrit change created: https://git.eclipse.org/r/44816
Gerrit change https://git.eclipse.org/r/44816 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7893b09339bfecbf7c1ea064eb501b58c62969e5
Verified on Sirius 3.0.0M6
New Gerrit change created: https://git.eclipse.org/r/45618
Gerrit change https://git.eclipse.org/r/45618 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4127adbc9cd745987adfac4fc849eb0ab1eced5f
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.