how to add menu to section title?
I have a section with TITLE_BAR, and i try to add a menu to the section header (like in the 开发者_如何学GoPDE editors). All I could find is the context menu.
I'm not sure if the tutorial in the previous answer will work for sections - as far as I know the menu contributions (from a plugin.xml) only apply to a view tool bar or menu - not the section header.
You could try investigating Section.setTextClient(...);
, you can certainly add a tool bar using that, so could use a drop-down button in order to show a menu, if that would achieve what you want?
This article has some interesting form / section related information too, though not directly related to your problem
Eclipse Forms: New in 3.3
Sounds like you are creating a view and you want to add a menu to the view. Here is an article describing the way to do that:
http://www.ibm.com/developerworks/library/os-eclipse-3.3menu/index.html
Use the Menu Location URI scheme menu: and specify the view Id.
精彩评论