Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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)
Enable/disable of action buttons not working on Eclipse IDE 3.7 [message #735276] Tue, 11 October 2011 11:55 Go to next message
Ajinkya Dhumal is currently offline Ajinkya DhumalFriend
Messages: 11
Registered: September 2011
Junior Member
Hi,

I am using Eclipse IDE 3.7 for my RCP application.

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.

Please suggest any pointers to resolve this issue.

Thanks in Advance,
Ajinkya
Re: Enable/disable of action buttons not working on Eclipse IDE 3.7 [message #736633 is a reply to message #735276] Fri, 14 October 2011 07:13 Go to previous message
Ajinkya Dhumal is currently offline Ajinkya DhumalFriend
Messages: 11
Registered: September 2011
Junior Member
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.
Previous Topic:Create and show my custom View
Next Topic:Eclipse 4.x RCP feature is not a replacement for Eclipse 3.x RCP feature?
Goto Forum:
  


Current Time: Thu Apr 25 21:56:35 GMT 2024

Powered by FUDForum. Page generated in 0.02674 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top