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

2022-01-16 00:00:00 eclipse-plugin java eclipse-rcp

我可以将 Eclipse 插件项目的引用添加到非插件 jar 中吗?这是一个我无法更改的罐子,所以我必须按原样使用它.

Can I add a reference from an eclipse plugin project to a non plugin jar? This is a jar that I can not change, so i have to use it as is.

谢谢伊多

推荐答案

最安全的方法是从现有的 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.

相关文章