Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Accessing the menu manager
Accessing the menu manager [message #603307] Fri, 13 November 2009 17:21
dwain Missing name is currently offline dwain Missing nameFriend
Messages: 35
Registered: October 2009
Member
I need to be able to update the menus when an editor gains focus. I am able to do that with the following discouraged access.

IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

if(window instanceof WorkbenchWindow)
{
MenuManager menuManager = ((WorkbenchWindow)window).getMenuManager();
menuManager.update(IAction.TEXT);
}


However I don't like using the discouraged access, so I am hoping that there is a better way to access the MenuManager or that someone might be able to show me how to do it in the extension manager.

I need to have some commands disabled depending on a variable that is in the editor input. Right now I have some definitions that disable them if it is the wrong type of editor, but not sure how I can get at a variable that is in the editors input in that way. Thank you for the help.

Dwain
Previous Topic:Accessing the menu manager
Next Topic:How to communicate between various views/models
Goto Forum:
  


Current Time: Thu Apr 25 13:11:14 GMT 2024

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

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

Back to the top