| Summary: | Drow down menus of tabbar are sometimes shifted. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Laurent Redor <laurent.redor> | ||||||||||||
| Component: | Diagram | Assignee: | Laurent Redor <laurent.redor> | ||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Pierre Guilet <pierre.guilet> | ||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | julien.dupont, pierre-charles.david | ||||||||||||
| Version: | 4.0.0 | Keywords: | triaged | ||||||||||||
| Target Milestone: | 4.1.1 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows NT | ||||||||||||||
| See Also: |
https://git.eclipse.org/r/83193 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0d9122b0915061d4d74642e9d7794adb77ff2851 |
||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Created attachment 264810 [details]
WrongMenuLocation.png
Created attachment 264811 [details]
CorrectMenuLocation.png
This problem does not exist on Sirius 3.1.x. (In reply to Laurent Redor from comment #3) > This problem does not exist on Sirius 3.1.x. The previous comment is not exact. The problem is already here before (at least in 3.1.3) but not exactly the same. The location is shifted to the left instead of to the right. The behavior changes is probably linked to bug 481573. But with Sirius 3.1.6 and Eclipse Juno, there is no problem. So there is probably also a link to the Eclipse platform. In fact, the problem exists with Sirius under Kepler 4.0.0 but does not exist with the same Sirius in Juno. So there is probably something that has been changed in platform and has broke the tabbar. The main difference is explained by "e4". The classes involved (ToolBarManager, ToolBar, IContributionItemà have not really changed but the events is managed differently with e4. The main difference seems that the AbstractTabbarFiller.addTabbarContributions() indirectly triggers the TabbarToolBarManager.update(boolean) instead of firstly be cleaned with TabbarFillerWithContributions.update(ISelection). See both stackTrace that triggers AbstractMenuContributionItem$TabbarContributionItem.fill(ToolBar, int) with a good index for Juno and a wrong index for Kepler. Created attachment 264826 [details]
Stacktrace under Juno
Created attachment 264827 [details]
Stacktrace under Kepler
To details, since e4, the stack is like this: * TabbarFillerWithContributions.doFill() * --> AbstractTabbarFiller.addTabbarContributions() * --> SlaveMenuService.populateContributionManager(ContributionManager, String) ... * --> SlaveMenuService.reconcileManagerToModel(IToolBarManager menuManager, MToolBar toolBar) * --> and the for each items of the menu manager, an update of the TabbarToolBarManager, TabbarToolBarManager.update(boolean), is triggered. The first TabbarToolBarManager.update(boolean) is called with a wrong visibility for "static" items and so they are created with a wrong index (AbstractMenuContributionItem.TabbarContributionItem.fill(ToolBar, int index)). Before e4, the fill method was called after having refreshed the visibility of items with TabbarFillerWithContributions.update(ISelection). So, to fix the problem, the visibility refresh of "static" items must be done before calling addTabbarContributions(). New Gerrit change created: https://git.eclipse.org/r/83193 Gerrit change https://git.eclipse.org/r/83193 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=0d9122b0915061d4d74642e9d7794adb77ff2851 Available in Sirius 4.1.1, see https://wiki.eclipse.org/Sirius/4.1.1 |
Created attachment 264809 [details] ModelingProject.zip Steps to reproduce: * Import the project ModelingProject from ModelingProject.zip * Open the diagram "new Diag" * Expand the filters menu of the tabbar * *KO: The list of 2 filters name is not just behind the button.* (see WrongMenuLocation.png) * Select the node C1 and the select again the diagram. * Expand the filters menu of the tabbar * *OK: The list of 2 filters name is now just behind the button.* (see CorrectMenuLocation.png)