<i id='VLlJ3'><tr id='VLlJ3'><dt id='VLlJ3'><q id='VLlJ3'><span id='VLlJ3'><b id='VLlJ3'><form id='VLlJ3'><ins id='VLlJ3'></ins><ul id='VLlJ3'></ul><sub id='VLlJ3'></sub></form><legend id='VLlJ3'></legend><bdo id='VLlJ3'><pre id='VLlJ3'><center id='VLlJ3'></center></pre></bdo></b><th id='VLlJ3'></th></span></q></dt></tr></i><div id='VLlJ3'><tfoot id='VLlJ3'></tfoot><dl id='VLlJ3'><fieldset id='VLlJ3'></fieldset></dl></div>

      <bdo id='VLlJ3'></bdo><ul id='VLlJ3'></ul>
  • <small id='VLlJ3'></small><noframes id='VLlJ3'>

    <tfoot id='VLlJ3'></tfoot>
    <legend id='VLlJ3'><style id='VLlJ3'><dir id='VLlJ3'><q id='VLlJ3'></q></dir></style></legend>

        如何删除 Eclipse RCP 中的弹出菜单贡献

        时间:2023-08-22
        <legend id='gw1A5'><style id='gw1A5'><dir id='gw1A5'><q id='gw1A5'></q></dir></style></legend>

              <tbody id='gw1A5'></tbody>

            <small id='gw1A5'></small><noframes id='gw1A5'>

              • <bdo id='gw1A5'></bdo><ul id='gw1A5'></ul>
                • <tfoot id='gw1A5'></tfoot>
                • <i id='gw1A5'><tr id='gw1A5'><dt id='gw1A5'><q id='gw1A5'><span id='gw1A5'><b id='gw1A5'><form id='gw1A5'><ins id='gw1A5'></ins><ul id='gw1A5'></ul><sub id='gw1A5'></sub></form><legend id='gw1A5'></legend><bdo id='gw1A5'><pre id='gw1A5'><center id='gw1A5'></center></pre></bdo></b><th id='gw1A5'></th></span></q></dt></tr></i><div id='gw1A5'><tfoot id='gw1A5'></tfoot><dl id='gw1A5'><fieldset id='gw1A5'></fieldset></dl></div>
                  本文介绍了如何删除 Eclipse RCP 中的弹出菜单贡献的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在一个 RCP 应用程序中工作,并且我知道哪个数据模型是 IResources 的实例.当弹出菜单可见时,我发现我想删除的其他插件贡献的命令.

                  代码示例:

                  <上一页>1 菜单管理器菜单管理器 = 新菜单管理器();2 mm.setRemoveAllWhenShown(true);3 菜单菜单 = menuManager.createContextMenu(this.treeViewer.getControl());4 this.treeViewer.getControl().setMenu(menu);5 getSite().registerContextMenu(menuManager, this.treeViewer);

                  如果我注释第 5 行上下文菜单不出现.

                  是否可以使用 plugin.xml 中的 menu-contribution 并删除其他插件的贡献?

                  注意:我的弹出菜单是声明性的,它位于 plugin.xml 中.

                  提前致谢

                  解决方案

                  一种可能的方法是执行所谓的Equinox 转换器挂钩",请参阅 http://wiki.eclipse.org/Equinox_Transforms

                  您可以通过一些示例检查捆绑包(有关更多信息,请参阅 wiki 页面),我在 XSLT 转换器方面取得了很好的经验,可以在某些 plugin.xml 文件向平台贡献其扩展之前对其进行操作(唯一的挑战是找出哪个包造成了烦人的上下文菜单条目,但您可以使用 PluginSpy 来确定邪恶者":-P.

                  HTH 汤姆

                  I'm working in a RCP application and I have a view which data model are instances of IResources. When popup menu is visible I find commands contributed by others plugins I would like to remove.

                  Sample of code:

                  1 MenuManager menuManager = new MenuManager();
                  2 mm.setRemoveAllWhenShown(true);
                  3 Menu menu = menuManager.createContextMenu(this.treeViewer.getControl());  
                  4 this.treeViewer.getControl().setMenu(menu); 
                  
                  5 getSite().registerContextMenu(menuManager, this.treeViewer);
                  

                  If I comment line 5 context menu doesn't appear.

                  Is posible use menu-contribution from plugin.xml and remove contributions of other plugins?

                  Note: My popup menu is declarative and it is in plugin.xml.

                  Thanks in advance

                  解决方案

                  A possible way is to exeucte so called "Equinox transformer hooks", see http://wiki.eclipse.org/Equinox_Transforms

                  You can checkout the bundles with some examples (see the wiki-page for more infos), I made good experiences with the XSLT transformer, to manipulate certain plugin.xml files before they're contributing their extensions to the platform (the only challenge is to find out which bundle is contributing the annoying context-menu entry, but you can use PluginSpy to determinate the "evildoer" :-P.

                  HTH Tom

                  这篇关于如何删除 Eclipse RCP 中的弹出菜单贡献的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何将 SDK 示例项目复制到工作区? 下一篇:Eclipse 使用什么 clearcase 插件

                  相关文章

                • <tfoot id='nihWb'></tfoot>

                      <small id='nihWb'></small><noframes id='nihWb'>

                      <legend id='nihWb'><style id='nihWb'><dir id='nihWb'><q id='nihWb'></q></dir></style></legend>

                    1. <i id='nihWb'><tr id='nihWb'><dt id='nihWb'><q id='nihWb'><span id='nihWb'><b id='nihWb'><form id='nihWb'><ins id='nihWb'></ins><ul id='nihWb'></ul><sub id='nihWb'></sub></form><legend id='nihWb'></legend><bdo id='nihWb'><pre id='nihWb'><center id='nihWb'></center></pre></bdo></b><th id='nihWb'></th></span></q></dt></tr></i><div id='nihWb'><tfoot id='nihWb'></tfoot><dl id='nihWb'><fieldset id='nihWb'></fieldset></dl></div>
                        <bdo id='nihWb'></bdo><ul id='nihWb'></ul>