无法让 Eclipse 识别我的插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7769730/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:10:16  来源:igfitidea点击:

Can't get eclipse to recognize my plugin

javaeclipsejakarta-eeeclipse-plugineclipse-rcp

提问by Marco A.

I exported my eclipse plugin through the "Export Wizard" in the manifest and seems like everything went well (no errors). It created a .jar file within a plugin directory in a zip file.

我通过清单中的“导出向导”导出了我的 eclipse 插件,看起来一切顺利(没有错误)。它在 zip 文件的插件目录中创建了一个 .jar 文件。

I thought putting the jar into my Eclipse plugin directory would install it (after re-launching eclipse) but that didn't work. Eclipse can't see the plugin (the perspective isn't showing up)

我认为将 jar 放入我的 Eclipse 插件目录会安装它(在重新启动 eclipse 之后),但这不起作用。Eclipse 看不到插件(透视图未显示)

I tried with Help->Install new software->local archive but it keeps saying "no software found"

我尝试使用帮助-> 安装新软件-> 本地存档,但它一直说“找不到软件”

Can you help me getting my plugin ready to be installed on a fresh Eclipse copy?

你能帮我把我的插件准备好安装在一个新的 Eclipse 副本上吗?

Ps. my plugin uses other dependencies like EMF/GMF

附言。我的插件使用其他依赖项,如 EMF/GMF

采纳答案by Fredrik

In eclipse, go to your console window. From the drop down meny, select OSGI console. Run the command ssor ss <name of your plugin>You will then see the state of your plugin and a number. The state will probably be "installed" which means if has been found, but some dependencies were not satisfied.

在 eclipse 中,转到您的控制台窗口。从下拉菜单中,选择 OSGI 控制台。运行命令ssss <name of your plugin>您将看到插件的状态和一个数字。状态可能是“已安装”,这意味着如果已找到,但不满足某些依赖项。

Run the command diag <number of your plugin>and you will see why it wasn't started.

运行该命令diag <number of your plugin>,您将看到它没有启动的原因。

For more details, see Wheres my bundle

有关更多详细信息,请参阅我的捆绑包在哪里

Edit:A first step to verify that the plugin is working would be to start up a new eclipse instance with your plugin. In the run configuration dialog, there is a tab with all the plugins that should be started. Make sure yours is checked and it will start with the new eclipse instance.

编辑:验证插件是否正常工作的第一步是使用您的插件启动一个新的 eclipse 实例。在运行配置对话框中,有一个包含所有应该启动的插件的选项卡。确保您的已选中,它将从新的 eclipse 实例开始。

回答by rockstar

By far the most ellaborate descriptions of installing your plugin is provided by Vogella deployment of your plug-in

到目前为止,安装插件的最详尽的描述是由 Vogella部署插件提供的

It covers all 3 possible ways in which you may install your plugin detailing the pros & cons of each of the following approaches :

它涵盖了安装插件的所有 3 种可能方式,详细说明了以下每种方法的优缺点:

1 . Installing your plug-in from your Eclipse IDE

1 . 从 Eclipse IDE 安装插件

2 . Export plug-in and put into dropins folder

2 . 导出插件并放入dropins文件夹

3 . Create update site for your plug-in

3 . 为您的插件创建更新站点

回答by Duncan Calvert

Sometimes you just have to restart Eclipse. File -> Restart and try again. Worked for me because Eclipse was caching the results of my local update site.

有时您只需要重新启动 Eclipse。文件 -> 重新启动并重试。对我来说有效是因为 Eclipse 正在缓存我的本地更新站点的结果。

回答by Deepak Azad

If you are using Eclipse 3.4 or above, put your plugin in the 'dropins' directory.

如果您使用的是 Eclipse 3.4 或更高版本,请将您的插件放在“dropins”目录中。

To install via Help->Install new software you need to create an 'Update site' or a 'p2 repository'.

要通过帮助-> 安装新软件进行安装,您需要创建一个“更新站点”或“p2 存储库”。