Community
Participate
Working Groups
I have a problem in an RCP application running on the Compatibility layer with the ShowViewMenu contribution item (created in ApplicationActionBarAdvisor via ContributionItemFactory.VIEWS_SHORTLIST). It is added directly to the window menu because there are just two views to show (Console and Properties). Normally the window menu should look like this: - Console - Properties - Separator - Other - Preferences (this is a normal action) When running on Eclipse 4.1, it only shows the first entry (Console) and nothing else, not even the Preferences action. When removing the contribution item, the Preferences action is visible as it should be. When putting the contribution item after the Preferences action, both Preferences and Console are visible, but still not the others. Is this related to or caused by Bug 316470?
If you change the code so that ShowViewMenu's 'dirty' field is removed and isDirty() always returns 'true', does the problem go away?
Also, check your error log at <runtime-workspace>/.metadata/.log (or in your RCPapp/configuration directory, or add -consoleLog). Are there any errors? If there are no more menu items after the first one you included, sounds like we stopped rendering them for some reason (maybe an exception?) PW
There were no corresponding exceptions in the log, just the menu were not there.
Created attachment 195069 [details] Patch against v20110504-1730 Remy Suen, your suggested fix works indeed. Thank you for the quick response! I'll attach a patch with my changes. The patch is agaist the v20110504-1730 tag, the version I am currently using.
(In reply to comment #4) > Remy Suen, your suggested fix works indeed. Thanks for verifying. This must be the problem where the MenuManager's update(boolean, boolean) method is called twice.
Remy, did we get this? PW
(In reply to comment #6) > Remy, did we get this? I just checked, no, it is still a problem.
Fix released to R4_development as 3c21dc24a4f8384529055e64e834acc87d2c4c1f. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=3c21dc24a4f8384529055e64e834acc87d2c4c1f
Verified by source inspection with M20110817-2001.