Eclipse Plugin uncommon dependency restriction
- There is a plugin X with open source code.
- I have cloned it and added my Class C. Lets call my version Xm (modified).
- 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.
精彩评论