【问题标题】:Add menu item for Import/Export context menu in Eclipse在 Eclipse 中为导入/导出上下文菜单添加菜单项
【发布时间】:2023-03-09 04:58:01
【问题描述】:

我正在尝试在 Project-Explorer 的上下文菜单中向 ImportExport 项添加子菜单。但是,我在菜单上找不到这些项目的 menuid/locationURI。

谁能帮我在 Eclipse 中向这些导入/导出菜单项添加项目。我正在使用氧气版本。我尝试了以下部分,但它在导入/导出项目下添加了项目。

   <extension
        point="org.eclipse.ui.menus">
        <menuContribution

        locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=addition">
        <command
        commandId="myplugin.command.mycommand"
        icon="icons/etool16/mycommand.png"
        label="Run mycommand"
        mnemonic="M1+P"
        tooltip="Do something with this project">
        </command>
        </menuContribution>
</extension>

【问题讨论】:

    标签: eclipse eclipse-plugin eclipse-rcp eclipse-oxygen


    【解决方案1】:

    您不会添加自己的操作,因为它们不是菜单。相反,ImportExport 向导有自己的扩展点,因此您可以通过主导入/导出向导启动它们。

    我有点困惑,您的上下文菜单中如何包含导入菜单。

    【讨论】:

    • 感谢您的回复。默认情况下,导入和导出扩展点已添加到上下文菜单中。我的问题是,如何在上面的上下文菜单中添加新的菜单项作为它的子菜单。
    猜你喜欢
    • 1970-01-01
    • 2013-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-17
    • 1970-01-01
    • 2020-09-06
    相关资源
    最近更新 更多