| Summary: | [design] Unhandled Command visible in main menu | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Heiko Mattes <HeikoMattes> | ||||||
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ivan | ||||||
| Version: | 2.2 | ||||||||
| Target Milestone: | 2.2 M2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Never mind. I tried to reproduce it in a bare bones RAP application and not the application we are using here and the menu was behaving like it should. Must be a bug in our application then. (In reply to comment #1) > Never mind. I tried to reproduce it in a bare bones RAP application and not the > application we are using here and the menu was behaving like it should. Must be > a bug in our application then. Than I will close it as INVALID. Please reopen if you find a problem inside the framework. After searching further for the bug on our side of the application, it seems like the branding is responsible for the bug. We use a modified form of the bussiness branding of RAP, so I checked out the bussiness branding from the design examples and the weird menu behaviour is there as well. Without specifying a branding ID, the menu is working correctly. Brandings tested: Branding ID left empty in the Entry Point -> menu works as expected. Branindg ID org.eclipse.rap.design.example.business.branding -> menu is showing unhandled items. Branding ID org.eclipse.rap.design.example.fancy.branding -> menu is showing unhandled items. Hope that helps. (In reply to Heiko Mattes from comment #3) > After searching further for the bug on our side of the application, it seems > like the branding is responsible for the bug. We use a modified form of the > bussiness branding of RAP, so I checked out the bussiness branding from the > design examples and the weird menu behaviour is there as well. Without > specifying a branding ID, the menu is working correctly. > > Brandings tested: > Branding ID left empty in the Entry Point -> menu works as expected. > Branindg ID org.eclipse.rap.design.example.business.branding -> menu is > showing unhandled items. > Branding ID org.eclipse.rap.design.example.fancy.branding -> menu is showing > unhandled items. > > Hope that helps. Could you provide a complete test project to demonstrate the issue? Created attachment 235183 [details]
Test project that shows the weird menu behaviour.
It looks like the error can be found in org.eclipse.rap.internal.design.example.managers.MenuBarManager in method hookMenuToToolItem( final MenuManager manager, Menu menu ) on line 147. It seems as if a contribItems[ i ].isVisible() check is missing. If that is added, the menu works for me. (In reply to comment #6) > It looks like the error can be found in > org.eclipse.rap.internal.design.example.managers.MenuBarManager in method > hookMenuToToolItem( final MenuManager manager, Menu menu ) on line 147. It seems > as if a contribItems[ i ].isVisible() check is missing. If that is added, the > menu works for me. Thanks. Fixed as suggested with commit b1a15134d7639f953ec11909aaa9a5d145d4dc57. |
Created attachment 235101 [details] Sample plugin.xml to show menu behaviour. I've added two commands to an entry in the main menu, one of them being managed by a default handler, the other not handled at all, but both are visible. I expected only the handled command to be show, as I supplied the checkEnabled=true in the visbleWhen clause. I've checked the same in an RCP environment, and there only the handled command is shown. I added an attchement with sample plugin xml, where I define in the main menu the Test entry, and then I add a handled and not handled command to it. Both are shown. I also added three sub menus, the first containing the handled command which is displayed properly. The second conaining the not handled command, which shows the sub menu, but not the command within, leaving an empty submenu. The last contains both commands, and that is displayed correctly, with only the handled command being shown.