| Summary: | Internationalized palette elements are duplicated on reload | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Pierre-Charles David <pierre-charles.david> | ||||||||||||
| Component: | Diagram | Assignee: | Florian Barbin <florian.barbin> | ||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | florian.barbin, julien.dupont | ||||||||||||
| Version: | 4.1.1 | Keywords: | triaged | ||||||||||||
| Target Milestone: | 4.1.8 | ||||||||||||||
| Hardware: | All | ||||||||||||||
| OS: | All | ||||||||||||||
| See Also: |
https://git.eclipse.org/r/111707 https://git.eclipse.org/r/111782 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=467a61c65a6a04fb01bd3ddd603aa664737cf627 |
||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 527397 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Pierre-Charles David
Created attachment 270221 [details]
Sample modeler to reproduce the issue
Created attachment 270222 [details]
Sample session to reproduce the issue
Created attachment 270223 [details]
Screenshot showing duplicated entries
Steps to reproduce:
1. Import the attached modeler.
2. Launch a separate runtime.
3. In the runtime, import the attached sample session.
4. Open the session and the diagram inside. The diagram is empty, and the palette shows a single section ("Outils") with a single entry ("Créer").
5. Open the MyEcore.ecore semantic model using a text editor (from Eclipse or outside, it doesn't matter). Add some blank lines at the end and save the file. If you modified the file from outside Eclipse you may need to refresh the workspace (or wait for it to happen automatically).
6. Go back to the diagram: the elements in the palette have been duplicated (sometimes twice, producing 3 copies).
The culprit seems to be PaletteManagerImpl.getPaletteEntry(PaletteContainer, String, Class<SectionPaletteDrawer>): to compare already existing palette entries with the complete set that should be visible, it compare the translated version of the label (e.g. "Outils") with the raw translation key from the VSM model (e.g. "%Tools"). They are always different so it always decide to add new entries instead of merging candidate entries with the already existing equivalents. Not sure we'll have time to look at this for 4.1.7 should should normally be released very soon (maybe tomorrow), but I'm putting it here anyway, in case 4.1.7 slips by a few days, and to avoid forgetting it. If 4.1.7 is released without this, I'll move it to 4.1.8. New Gerrit change created: https://git.eclipse.org/r/111707 Gerrit change https://git.eclipse.org/r/111782 was merged to [v4.1.x]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=467a61c65a6a04fb01bd3ddd603aa664737cf627 Created attachment 271809 [details]
Sample modeler to reproduce the issue
Created attachment 271810 [details]
Sample session to reproduce the issue
Available in Sirius 4.1.8, see https://wiki.eclipse.org/Sirius/4.1.8 |