【问题标题】:Unable to export Eclipse Plugin无法导出 E​​clipse 插件
【发布时间】:2013-08-06 07:33:20
【问题描述】:

我创建了一个插件,可以在现有菜单中添加一个菜单(使用 Hello, World 命令)

当我在测试时运行它时,运行时运行时-EclipseApplication 已创建,我可以看到菜单和命令。但是当我从导出向导安装它时,我看不到菜单。

没有可调试此问题的日志。

我已经安装了相同类型的插件(使用 Hello, World 命令)。这会导致任何问题

这是plugin.xml

    <?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

   <extension
     point="org.eclipse.ui.commands">
      <category
        name="Sample Category"
        id="CheckList.commands.category">
      </category>
      <command
        name="Create Checklist"
        categoryId="CheckList.commands.category"
        id="CheckList.commands.sampleCommand">
      </command>
   </extension>
   <extension       
     point="org.eclipse.ui.handlers">
      <handler
        commandId="CheckList.commands.sampleCommand"
        class="checklist.handlers.createChecklistHandler">
      </handler>
   </extension>
   <extension
     point="org.eclipse.ui.bindings">
      <key
        commandId="CheckList.commands.sampleCommand"
        contextId="org.eclipse.ui.contexts.window"
        sequence="M1+8"
        schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
      </key>
   </extension>
   <extension
     point="org.eclipse.ui.menus">
      <menuContribution
        locationURI="menu:org.eclipse.ui.main.menu?after=additions">
         <menu
           label="Create Checklist"
           mnemonic="M"
           id="CheckList.menus.sampleMenu">
            <command
              commandId="CheckList.commands.sampleCommand"
              mnemonic="C"
              id="CheckList.menus.sampleCommand">
            </command>
         </menu>
      </menuContribution>
      <menuContribution
        locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
         <toolbar
           id="CheckList.toolbars.sampleToolbar">
            <command
              commandId="CheckList.commands.sampleCommand"
              icon="icons/sample.gif"
              tooltip="Create migration Checklist"
              id="CheckList.toolbars.sampleCommand">
            </command>
         </toolbar>
      </menuContribution>
   </extension>

</plugin>

【问题讨论】:

  • 您是否使用了另一个已安装的插件名称?
  • @scawf no.. 我用了不同的名字
  • 您应该尝试为菜单使用不同的 id

标签: plugins eclipse-plugin


【解决方案1】:

我怀疑新菜单在一个插件中,该插件在启动配置中,但不在在产品定义中。

编辑

我希望您当前的产品定义是基于插件的,而不是基于功能的:

您现在可以通过依赖项页面添加所需的插件:

【讨论】:

  • 我认为这可能是问题所在。了解产品定义的任何帮助
猜你喜欢
  • 2014-04-18
  • 1970-01-01
  • 1970-01-01
  • 2020-04-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-09
  • 2016-07-06
相关资源
最近更新 更多