Thanks
everyone for you suggestions and hints. This stackoverflow
question describes the same issue I have and the answers and
comments are quite relevant:
http://stackoverflow.com/questions/7688519/patch-a-plugin-with-a-single-class
I
have also looked at the blog post of Andrew Niefer:
http://aniefer.blogspot.ca/2009/06/patching-features-with-p2.html
I
have concluded I cannot use a fragment patch. The ways to go
is a Feature Patch. I have tried Andrew Niefer “facon de
faire” and yeah that work well. However this doesn’t
solve my issue of supporting different CDT releases. Yet if
the plugins I need to patch have only bug fixes and
refactoring then I believe it shouldn’t be an issue to use
the code of branch CDT 8.3 to patch the CDT 8.1 and 8.2
releases as well. This would solve the support of the
versioning between the latest CDT release. Now I have 2
plugins to patch. The org.eclipse.cdt.managedbuilder.ui and
org.eclipse.cdt.managedbuilder.core plugins. I have done a
git branch compare to check what changed with those plugins
between CDT 8.1 and CDT 8.3. At first glance the API of
org.eclipse.cdt.managedbuilder.ui didn’t change and only bug
fixes where introduced. The API of
org.eclipse.cdt.managedbuilder. seems to have changed
slightly. The most important change seems to me the adding
of an attribute (useByScannerDiscover)in the
BuildDefinition schema for the extension.
Now
the question I have for you guys is this one. Given the
upper comments would it be possible to use the current code
of CDT 8.3 to patch the CDT 8.1/8.2 if I patch the 2 plugins
org.eclipse.cdt.managedbuilder.ui and
org.eclipse.cdt.managedbuilder.core without introducing
issues for the end user using CDT ?