Project: Eclipse_Platform_UI
Bug 175890 [Contributions] need a way to restrict Expression evaluation
Reported: 2007-02-28 14:07:06 | Status: verified fixed

There needs to be a way to restrict when a visibility expression for a menu/toolbar element is evaluated. This can be seen in the action set case. Assuming action sets have a 1 to 1 mapping with contexts, we would then tie context changes to action set menu elements via a visibility expression. This breaks down when you have multiple windows, however. Imagine you have a window up with a selection of action sets enabled. This implies that certain contexts are enabled. Now when you open another window (onto a different perspective) the active action sets change. This causes the active contexts to change, which in turn causes the window to be updated. Unfortunately BOTH windows will be updated because contexts are global beasts - in this scenario both windows would now show the action sets of the enabled window.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/ContributionRoot.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/menus/MenuAdditionCacheEntry.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/IContributionRoot.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuBuilder.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/menus/MenuVisibilityTest.java