Home » Eclipse Projects » Rich Client Platform (RCP) » Enable/disable of action buttons not working on Eclipse IDE 3.7(Action buttons on the menu bar of RCP application using target platform 3.7 are not getting disabled on state change of attributes)

I am facing one particular scenario wherein the action buttons on the menu bar of my RCP application aren't getting disabled on state change of certain attributes.
However these action buttons of menu bar work as expected on Eclipse IDE 3.5.

On analysis I found that the 'getItemCount' method from Menu.java(org.eclipse.swt.widgets.Menu version -> 3.7.0.v3735b) returns zero when running on Eclipse IDE 3.7.
Thus on IDE 3.7 it is unable to get the menu Items. But on Eclipse 3.5 IDE, the 'getItemCount' method from Menu.java(org.eclipse.swt.widgets.Menu -> 3.4.1.v3449c) successfully returns the number of menu items.

Some detailed analysis on the above issue, with Eclipse IDE 3.7 shows that the menu.getItems() method is unable to get the sub menu items from menus at menu bar, due to which it is also unable to get the count of sub menus.
Further it is observed that the sub menu items of any particular menu are obtained only after explicitly clicking on that menu item.Here onwards the menu.getItems() method is able to fetch the sub menus, get the sub menu count from menu.getItemCount() and the enable/disable functionality also works as expected. This happens since the menu properties are not set when the application starts, but only aftre clicking on any perticular menu.

However this behaviour is not observed on Eclipse IDE 3.5 and Target platform 3.3. Here the menu properties are set immediately when the RCP application opens.

I am still unable to find any specific solution to this. Please reply for any pointers.