开发者

Eclipse Plugin uncommon dependency restriction

开发者 https://www.devze.com 2023-03-25 16:49 出处:网络
There is a plugin X with open source code. I have cloned it and added my Class C. Lets call my version Xm (modified).
  1. There is a plugin X with open source code.
  2. I have cloned it and added my Class C. Lets call my version Xm (modified).
  3. My plugin Y开发者_运维知识库 depends on class C.

The question: How can I achieve that plugin Y is only installable when class C is available (i.e. plugin Xm is installed)?

I could make it by adding a version dependency, but we remember that there is original plugin X that can have even higher version then my Xm and doesn't have my class.


Basically, your Xm is not the same as X, so it should have a different plug-in ID. Thus there are no mixing the original version with your version.

Alternatively, you can consider using a fragment to X with just your added functionality. And then have a feature with the fragment and Y.

EDIT: Note that the use of fragments is normally only possible when you add new classes or resources to the existing plug-in. Unless you play certain dubious tricks with OSGi and the class path of the original bundle, you cannot replace - or hot-fix - an existing class.


How about this: Create feature G that includes feature F and plug-in Y.

0

精彩评论

暂无评论...
验证码 换一张
取 消