Community
Participate
Working Groups
Build Identifier: 3.2 to current Only one context menu contribution is updated after a registry mofication event received. Reproducible: Always
Created attachment 189364 [details] Eclipse project to reproduce
The attached plugin example makes contributions to popupmenu of any text based editor, adding statically a node named BUG_EXAMPLE_STATIC_NODE, and programatically a node named BUG_EXAMPLE_DYNAMIC_NODE. Since registry modification is being performed on activator startup (previous to any human interaction), the editor has to be already opened from a previous workbench session. Try with java editor.
Useful breakpoints: PopupMenuExtender.registryChanged(IRegistryChangeEvent) PopupMenuExtender.readStaticActionsFor(String)
After a matching registry delta modification receiver, viewercontributions made to ext point org.eclipse.ui.popupMenus are lost, and the part needs to be reopened. Only one undeterminated context menu is updated after a registry mofication event received (the first element in staticActionBuilders.keySet().iterator())
Created attachment 189548 [details] Prososed patched source Proposed patch to PopupMenuExtender 1.47. As I undestand the problem occurs in menu showing: stack menuAboutToShow->readStaticActions()->readStaticActions(String) Condition in line 465 only is valid for the first menu call, since once it is passed, bitSet value is modified. Proposed implementation carries out statement in line 469 in order to execute readStaticActions() without changing bitSet value. The rest of readStaticActions(String) references are updated accordingly, in order to avoid side effects.
I didn't look at the patch but when tackling this bug, one must carefully look not to impact performance for other scenarios.
Completely agreed. The method and bitset attribute are private so that make things easier. Changes are straightforward if you compare both codes. Regards
Thanx for the suggested changes, we'll have a look. Just FYI, that's not a patch, just a file. Have a look at http://wiki.eclipse.org/Platform_UI/How_to_Contribute PW
Thanks for the info
Created attachment 189657 [details] Proposed patch
(In reply to idelvall from comment #1) > Created attachment 189364 [details] > Eclipse project to reproduce Unfortunately the application is incomplete (missing class). After fixing it I was able to launch it however I'm not sure if I understand the issue. Could you please prepare better example demonstrating the issue (running the current example I always get two context menu items, the static and the dynamic one) and describe the steps needed to reproduce it. thanks in advance for help, Daniel
Action, popupMenus and viewerContribution extensions are deprecated in favor of org.eclipse.ui.commands/org.eclipse.ui.menus. No work will be planned about actions.