Setting start levels & auto-start of Eclipse plug-ins: p2.inf vs product definition

依然范特西╮ 提交于 2019-12-07 07:31:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/17525677/setting-start-levels-auto-start-of-eclipse-plug-ins-p2-inf-vs-product-definit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!