| Summary: | Style customization labelFormat Bold/Italic | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Melanie Bats <melanie.bats> | ||||
| Component: | Core | Assignee: | Laurent Redor <laurent.redor> | ||||
| Status: | CLOSED FIXED | QA Contact: | Florian Barbin <florian.barbin> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cedric.brun, esteban.dugueperoux, florian.barbin, laurent.fasani, laurent.redor, max.bureck, pierre-charles.david | ||||
| Version: | 3.0.0 | Keywords: | triaged | ||||
| Target Milestone: | 4.0.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: |
https://git.eclipse.org/r/68901 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d5f32547b60d19b08be6b68ff45fd5206712f6cd https://git.eclipse.org/r/72543 https://git.eclipse.org/r/72608 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=407a3a24d89c963d1bc01ae0dce3ae732eed4eb8 https://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=f1b84f4ac842b1272297bf4c765bdb9f03b22960 |
||||||
| Whiteboard: | backport | ||||||
| Attachments: |
|
||||||
|
Description
Melanie Bats
I have the same problem, the labelFormat property now has the cardinality of 0..4 and is ordered and unique. So I should be able to assign an OrderedSet to the property, which does not work. I will attach a sample project. Open the diagram in the "model/TestMe.aird" file and you will see that the style customization throws an exception with the message "The value '[bold, italic]' is not a valid enumerator of 'FontFormat'". Created attachment 256024 [details]
Example project showing problems with syle customization for BasicLabelStyleDescription::labelFormat property
New Gerrit change created: https://git.eclipse.org/r/68901 Gerrit change https://git.eclipse.org/r/68901 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d5f32547b60d19b08be6b68ff45fd5206712f6cd This introduced a regression detected thanks to EcoreTools. - drag&drop an EClass having at least one required (1..1) attribute in a diagram => nothing happens and the shapes does not appear in the diagram. Such a required attribute is supposed to be displayed with a BOLD fontFormat, and EcoreTools uses the StyleCustomization for this. What happens is that an ArrayStoreException is thrown during the refresh leading to a complete rollback. Cédric: In EcoreTools, the service must be like this now:
public FontFormat fontFormatBold(EObject any) {
return FontFormat.BOLD_LITERAL;
}
instead of
public EEnumLiteral fontFormatBold(EObject any) {
return ViewpointPackage.eINSTANCE.getFontFormat().getEEnumLiteral("bold");
}
New Gerrit change created: https://git.eclipse.org/r/72543 Cédric: The above gerrit corresponds to the proposed solution in comment 6. (In reply to Laurent Redor from comment #8) > Cédric: The above gerrit corresponds to the proposed solution in comment 6. This looks like a breaking change which might impact quite a few modelers and be fairly hard to detect. Why would that be necessary whereas it was not before ? New Gerrit change created: https://git.eclipse.org/r/72608 Yes, it can be considered as breaking change. The gerrit of comment 10 corresponds to a Sirius documentation update to notify these changes. Your service worked before, because it was evaluated to a String value (bold) and then converted to a FontFormat. Now the service is evaluated as Object (to allow list value, "bold AND italic" for example). There is no longer the magic "String conversion". Gerrit change https://git.eclipse.org/r/72608 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=407a3a24d89c963d1bc01ae0dce3ae732eed4eb8 Gerrit change https://git.eclipse.org/r/72543 was merged to [master]. Commit: http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=f1b84f4ac842b1272297bf4c765bdb9f03b22960 According to comment 9 the documentation of Sirius has been completed and the service in EcoreTools has been modified. Verified on Sirius 4.0.0.RC1 Available in Sirius 4.0.0. |