如何进行多产品Eclipse插件开发设置?
我有一组插件需要支持不同的 Eclipse 产品。有一个独立于产品的核心插件,以及一个适用于产品 X、产品 Y 等的适配插件。
在部署方面,我认为核心插件有一个功能,每个插件有一个功能产品,包含适配插件并依赖于核心功能,因此核心插件无需用户选择即可安装。
1)是否有更好的方式来构建特征?
在开发方面,我希望能够在同一工作区中使用核心插件和适配插件,据我了解,这给了我两个主要选择:a)使用各自的安装作为目标在每个产品中工作平台,或 b) 在原始 Eclipse 中工作,并为每个产品明确定义目标平台。
2)设置开发环境的最佳方式是什么?
如果选择 a),我可以为不同的产品使用相同的工作区,还是需要设置单独的工作区?换句话说,只要不同的 Eclipse 产品都基于相同的(例如)主要版本(例如 3.x),它们就能够共享工作空间吗?
如果选择 b),Eclipse 可以同时管理多个目标平台吗?换句话说,同一工作区中的不同插件项目是否可以在同一构建过程中针对不同的目标平台进行编译?如果没有,我如何在它们之间自动切换,这样我就不必在工作区构建期间手动执行此操作?
或者确实,我是否错过了一些基本的东西,是否有更好的方法来完成这一切?
I have a set of plug-ins which need to support different Eclipse products. There is a core plug-in, which is product-independent, and an adaptation plug-in each for Product X, Product Y, etc.
Deployment-wise, I'm thinking one feature for the core plug-in and one for each product, containing the adaptation plug-in and having a dependency to the core feature, so the core plug-in gets installed without the user having to select it.
1) Is there a better way of structuring the features?
On the development side, I would like to be able to work with both the core and adaptation plug-ins within the same workspace, which as I understand it gives me two main options: a) working within each product using their respective installations as target platforms, or b) working in raw Eclipse with an explicitly defined target platform for each product.
2) What would be the best way to set up the development environment?
If option a), can I use the same workspace for different products or would I need to set up separate workspaces? In other words, are different Eclipse products able to share a workspace as long as they're all based on the same (say) major version, eg 3.x?
If option b), can Eclipse manage multiple simultaneous target platforms? In other words, can different plug-in projects within the same workspace be compiled against different target platforms during the same build? And if not, how could I automate switching between them so I wouldn't have to do that manually during a workspace build?
Or indeed, am I missing something fundamental and is there a much better way of doing all this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答是,无论哪种方式都可以。
每个产品可以有 1 个工作区,每个工作区都有该产品的目标平台。目前,Eclipse 支持每个工作区(而不是每个项目)激活一个目标平台。
或者,您可以将 Eclipse 和所需的第 3 方插件作为目标平台,然后在一个工作区中简单地处理所有 3 个产品和通用插件。如果您的源插件总数<20,这可能没问题。对于>20,Eclipse 支持工作集,它将隐藏您目前未使用的插件。
The short answer is you can do it either way.
You can have 1 workspace per product, and each workspace has the target platform of that product. At the moment, eclipse supports one target platform active per workspace, not per project though.
Or you can have eclipse and the 3rd party plugins you need as your target platform, and simply work on all 3 products and the common plugin in one workspace. If your total source plugins is <20, this would probably be fine. For >20, eclipse supports Working Set which would hide the plugin you are not working on at the moment.