Bug 577572

Summary: Context menu that's 4 level or more cannot be hidden
Product: [Eclipse Project] Platform Reporter: Page <pagew2000>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Page CLA 2021-12-01 13:30:55 EST
We have some context menu that has 4 levels, and it is set to be hidden for some conditions, however it is still visible but upon selecting it becomes disabled.

Looks like it's related to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=34969 where it's purposely setting it as disabled (see code in org.eclipse.jface.action.MenuManager::updateMenuItem()).

And it's hardcoded in eclipse code to only process menus up-to 3 levels, seeĀ org.eclipse.e4.ui.workbench.renderers.swt.MenuManagerShowProcessor::showMenu() where the recursiveLevel is 2 (starting index 0).

We would like those context menus to be hidden as defined based on visibleWhen clause not just disabled.