部署新开发的 Eclipse 插件 [英] Deploying a newly developed Eclipse Plugin

查看:38
本文介绍了部署新开发的 Eclipse 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个 Eclpise 插件(CDT 的错误解析器),它在 eclipse 的调试器版本中运行良好.但是,我一生都无法弄清楚如何将插件安装到 Eclipse 中.我可以将插件导出为 jar 文件,并且似乎导出没有错误.我将插件 jar 文件放入 eclipsedropins 中,eclipse 没有加载它.如果我将它添加到插件目录,那就没有运气了.features 目录似乎也忽略了我的插件.

I have written an Eclpise plugin (an Error Parser for the CDT), and it works just fine in the debugger version of eclipse. However I cannot for the life of me figure out how to install the plugin into eclipse. I can export the plugin as a jar file, and it seems to export without errors. I put the plugin jar file into eclipsedropins and it is not loaded by eclipse. If I add it to the plugins directory, no luck. The features directory also seems to ignore my plugin.

所以我想,好吧,我会尝试通过 GUI 安装它.所以我浏览到插件存档所在的位置并将其添加为本地更新站点,但 eclipse 抱怨那里没有插件.

So I thought, OK, I'll try installing it through the GUI. So I browse to where the plugin archive is and add it as a local update site, but eclipse complains there is no plugin there.

我很沮丧.请帮忙.

推荐答案

将插件放入 eclipse/plugins 文件夹应该可以.如果没有,这通常意味着 Eclipse 出于性能原因缓存了插件配置.您可以强制 Eclipse 重新扫描插件目录,方法是使用 -clean 命令行参数启动它.

Putting the plugin into the eclipse/plugins folder should work. If it doesn't, that usually means Eclipse has cached the plugins configuration for performance reasons. You can force Eclipse to rescan the plugins directory for changes by starting it with the -clean command-line argument.

Eclipse 的典型部署机制是使用特性.一项功能包括插件(在您的情况下,可能只有一个),并且可以通过 Eclipse 更新管理器安装.要使用功能部署插件,您需要执行以下操作:

The typical deployment mechanism for Eclipse is to use features. A feature includes plugins (in your case, probably just one), and can be installed through the Eclipse update manager. To deploy your plugin using a feature, you would do the following:

  1. 创建一个功能项目,并使用功能编辑器将您的插件添加到功能中.
  2. 创建一个更新站点项目,并使用更新站点编辑器将您的功能添加到更新站点.
  3. 构建更新站点.这将创建一个 site.xml 文件、一个 features 文件夹和一个 plugins 文件夹.

然后您应该能够将 Eclipse 更新管理器指向包含 site.xml 的文件夹或 URL,并以这种方式安装您的插件.这种方法的优点是您可以将文件上传到网站并进行远程部署.

You should then be able to point the Eclipse update manager at the folder or URL containing the site.xml, and install your plugin that way. The advantage of this approach is you can upload the files to a website and deploy remotely.

这篇关于部署新开发的 Eclipse 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆