Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Add MRU to File menu defined in plugin.xml ?
Add MRU to File menu defined in plugin.xml ? [message #551620] Sun, 08 August 2010 11:08 Go to next message
Juergen Weber is currently offline Juergen WeberFriend
Messages: 65
Registered: July 2009
Member
Hi,

I'd like to use a MRU list of recently opened editors to the file menu of my RCP application.
I found some samples
( http://www.eclipse.org/forums/index.php?t=tree&th=141135 &)
(eclipse-sourceBuild-srcIncluded-3.6\src\plugins\org.eclipse .ui.ide\src\org\eclipse\ui\internal\ide\WorkbenchActionBuild er.java)

but they create a new menu:
MenuManager fileMenu = new MenuManager(
"&File", IWorkbenchActionConstants.M_FILE );

But how can I add to a File menu that is defined in plugin.xml in
ApplicationActionBarAdvisor.fillMenuBar(IMenuManager) ?
Would that be with findMenuUsingPath?

Thanks,
Juergen
Re: Add MRU to File menu defined in plugin.xml ? [message #553160 is a reply to message #551620] Mon, 16 August 2010 15:10 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

if it was defined as a CompoundContribution that could work from a
<dynamic/> entry, you could add it with XML. But there are a lot of
items not you converted from action based to command based. In that
case (and I believe this is one of them) you would either have to
convert it yourself or use your ActionBarAdvisor to fill in a skeletal
File menu.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
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: Add MRU to File menu defined in plugin.xml ? [message #786822 is a reply to message #551620] Mon, 30 January 2012 21:12 Go to previous messageGo to next message
Valerio Santinelli is currently offline Valerio SantinelliFriend
Messages: 39
Registered: January 2012
Member
Any news if the MRU has been ported to commands?
Re: Add MRU to File menu defined in plugin.xml ? [message #787381 is a reply to message #786822] Tue, 31 January 2012 14:15 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Do you mean org.eclipse.ui.actions.ContributionItemFactory.REOPEN_EDITORS ? You could always host that in a <dynamic /> menu contribution ... check out the extension point description for org.eclipse.ui.menus.

PW


Previous Topic:can't add org.eclipse.core.expressions
Next Topic:asyncexec() and jobs and main UI blocking
Goto Forum:
  


Current Time: Fri Apr 26 14:28:56 GMT 2024

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

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

Back to the top