Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to change the name of Custom Menu Item on selecting the parent menu(Plugin Development)
icon5.gif  How to change the name of Custom Menu Item on selecting the parent menu [message #647290] Wed, 05 January 2011 15:18 Go to next message
Dharmang  is currently offline Dharmang
Messages: 2
Registered: January 2011
Junior Member
Hi,

I wan to change the name of my Custom Menu item on clicking the parent Menu.

For that I am using following code:

IWorkbench workbench = Activator.getDefault().getWorkbench(); //PlatformUI.getWorkbench();
Menu menubar = workbench.getActiveWorkbenchWindow().getShell().getMenuBar() ;

menubar.addMenuListener(new MenuListener() {

@Override
public void menuShown(MenuEvent arg0) {
}

@Override
public void menuHidden(MenuEvent arg0) { }
});

but it never calls the public void menuShown(MenuEvent arg0) {} method while the menuHidden method is working fine.

What should I do? Any work around?
Thanks in advance.
Re: How to change the name of Custom Menu Item on selecting the parent menu [message #647359 is a reply to message #647290] Wed, 05 January 2011 18:44 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You want org.eclipse.platform
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to change the name of Custom Menu Item on selecting the parent menu [message #647360 is a reply to message #647290] Wed, 05 January 2011 18:44 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Sorry, you want eclipse.platform

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: How to change the name of Custom Menu Item on selecting the parent menu [message #647414 is a reply to message #647360] Thu, 06 January 2011 07:15 Go to previous messageGo to next message
Dharmang  is currently offline Dharmang
Messages: 2
Registered: January 2011
Junior Member
Hi Paul,

You mean I need to add eclipse.platform as dependencies and then it will work?

If it is so then I tried the same but it is still not working.

Thanks,
Dharmang
Re: How to change the name of Custom Menu Item on selecting the parent menu [message #647445 is a reply to message #647414] Thu, 06 January 2011 12:29 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 01/06/2011 02:15 AM, Dharmang wrote:
> If it is so then I tried the same but it is still not working.

Sorry, I should have been more clear. Menus are a contribution
controlled by the platform, so you should ask your question in the
eclipse.platform newsgroup.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Dynamic target platform
Next Topic:Synchronize product definition to plugin.xml in headless build?
Goto Forum:
  


Current Time: Thu Oct 02 04:42:09 GMT 2014

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

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