开发者

Dynamic menu contribution in plugin.xml

In my plugin.xml I have

<menuContribution
      allPopups="false"
      locationURI="menu:arm.views.funblocks?after=additions">
      <menu
           icon="icons/fblock.gif"
           id="arm.views.funblocks.create"
           label="%arm.views.funblocks.create">
           <dynamic class="ru.focusmedia.odp.arm.funblocks.navigator.admin.CreateFunBlockContrib"
               id="arm.views.funblocks.create.menuitems">
           </dynamic>
      </menu>
      <command
           commandId="org.eclipse.ui.edit.delete"
           style="push">
      </command>
</menuContribution>

and this works fine. However, if I replace menu: with t开发者_如何转开发oolbar: in locationURI, only the delete command shows up, but not the menu. I've also tried replacing <menu> element with <toolbar>, but with no result. How can I do this?


You cannot add a menu or toolbar to a toolbar.

You can make the content of a menu of toolbar completely dynamic by using the class attribute of the menuContribution element.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜