设置开始级别& Eclipse插件的自动启动:p2.inf和产品定义 [英] Setting start levels & auto-start of Eclipse plug-ins: p2.inf vs product definition

查看:119
本文介绍了设置开始级别& Eclipse插件的自动启动:p2.inf和产品定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以使用p2.inf文件或使用产品定义文件为Eclipse中的软件包设置启动级别和自动启动标志。在产品文件中进行操作可以给我工具支持,并将设置放在我的启动配置中。另一方面,使用p2.inf文件允许我根据每个功能来管理起始级别,这给我一个很好的开始级别的设置。



现在我的问题:



定义启动级别和自动启动标志的首选方式是什么?
p2.inf似乎有点过时,但是有没有一种方法可以在每个功能基础上定义起始级别和自动启动标志,而不使用p2.inf?

解决方案

这真的归结于个人喜好。产品级别是大多数时候最终的最终制品。正如你所发现的,它具有更好的工具集成。当产品由Tycho或PDE Build组装时,您将准确了解其中的内容以及需要开始的工作,以便正常工作。



然而,有时在产品定义中,特别是仅由功能组成时,不太可能下到捆绑粒度级别。但是,在功能级别或者捆绑级别定义启动属性可能是棘手的。例如,当有人在其他产品中使用您的功能/捆绑包时,他们可能会有不同的自动启动/启动级别要求。



FWIW,p2.inf文件isn'已经过时了。这是修改/优化/指示p2的原始裸机。这只是它没有真正好的工具,可能永远不会。


I know I can set start levels and auto-start flags for bundles in Eclipse using a p2.inf file or using a product definition file. Doing it in the product file gives me tooling support and puts the settings into my launch configuration. On the other hand, using the p2.inf file allows me to manage start levels on a per-feature basis which give me a nice grouping of start-level settings.

Now my questions:

What's the preferred way of defining start-levels and auto-start flags? p2.inf seems a bit outdated but is there a way to define start-levels and auto-start flags on a per-feature basis without using p2.inf?

解决方案

It really comes down to a personal preference. The product level is the ultimate final artifact most of the time. As you discovered, it has much better tooling integration. When the product is assembled by Tycho or PDE Build you'll know exactly what's in it and what needs to be started for it in order to work properly.

However, sometimes it doesn't feel right to go down to the bundle granularity level in product definitions especially when it's composed of features only. But defining start properties at the feature level or even at the bundle level can be tricky, though. For example, when someone consumes your features/bundles in another product they might have different auto-start/start-level requirements.

FWIW, the p2.inf file isn't outdated at all. It's the raw bare metal to modify/optimize/instruct p2. It's just that there isn't really good tooling for it and there probably never will be.

这篇关于设置开始级别& Eclipse插件的自动启动:p2.inf和产品定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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