且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将非插件项目引用到eclipse插件项目

更新时间:2023-11-28 15:58:10

最安全的方法是从现有的 jar 文件创建一个新插件:

The safest approach would be to create a new plugin from your existing jar file:

选择新建项目->插件开发->现有JAR档案中的插件

然后选择 jar 文件(Galileo 上的Add Externals"),为项目命名并填写一些插件属性(可选)并选择是否要解压缩 jar或保持原样.我保持选中复选框...

Then choose the jar file(s) ('Add Externals' on Galileo), name the project and fill in some plug-in properties (optional) and choose whether you want to unzip the jar or keep it as it is. I keep the checkbox checked...

就是这样.Eclipse 将自动生成一个导出所有包的插件项目,以便它可以在您的插件或 rcp 项目中使用.

And that's it. Eclipse will autogenerate a plugin project that exports all packages so that it can be used in your plug-in or rcp project.