[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Refresh Coolbar after creating new AbstractContributionFactory.

kevin j miles wrote:
once i stopped laughing i began to fret about my current approach... i'll let you know what i find.


In 3.4 we keep a list of ManagerPopulationRecords, so when another ACF is added org.eclipse.ui.internal.menus.WorkbenchMenuService.addContributionFactory(AbstractContributionFactory) knows to "install" it immediately.


In 3.3 you would somehow have to take your ACF and call into org.eclipse.ui.internal.menus.WorkbenchMenuService.processAdditions(IServiceLocator, Expression, ContributionManager, AbstractContributionFactory, Set) to get it added in a "timely" manner, but that's a private method (the best you can do in 3.3 is via reflection).

The other (totally non-portable and wacky) suggestion would be to run some similar code from within that method, you need a ContributionRoot and then you could fill it in yourself (having already "illegally" obtained the CoolBarManager :-)

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/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm