How do I install an eclipse plugin using a snippet plugin and deploy it in my eclipse product?

I'm trying to apply a patch to an existing plugin using a snippet plugin as described here:

Steps to use snippets to fix a plugin - Eclipsepedia

The patch to the host plugin involves replacing one class file with an updated class file. But I don't understand this concept in the Modify Templates section of the Preferences Control Panel steps 5) - 11). Here it instructs you to change the host module. I thought the whole idea is that you don't have to touch the host plugin - the snippet you deploy adds the patch?

My product consists of the eclipse framework and org.eclipse.cdt functions plus my own plugins that use cdt. This is the org.eclipse.cdt.core plugin that I would like to install.

I followed the steps in the eclipse wiki and created a snippet project that contains the package and class that I want to install in the host plugin. I have built this in maven and when I run this product I can see that the plugin of my fragment is active but the class it contains is not called; the original host plugin class.

I guess the problem is that the modified host module is not in my deployed product. The snippets guide has no guidelines for deploying the host plugin and I'm not sure how or why this is needed.

(I've used the patch feature successfully in the past for this kind of thing, but only created using PDE - I couldn't get my patch to build under maven - that's why I'm looking into using snippets to see if I can get them to build under maven .)

UPDATE *: I am building my assembly using Tycho plugin in Maven Tycho - creating Eclipse plugins with maven .

Thanks for the link to the "OSGi Core Release 5 Specification". It was helpful to read.

So, if my understanding is correct, a snippet can overlay its class on top of the host plugin if the host plugin is already "prepared" for patching by the snippet. This includes modifying the host plugin manifest. Specifically: 1. add a new library and move it up. package. Remove this library from assembly properties; the library is just a link and should not be created by the host plugin. + add Eclipse-ExtensibleAPI: true for file manifest.mf + bump version number.

In my case, it seems if I wanted to fix the org.eclipse.cdt.core plugin using a snippet, I would have to deliver a prepared version of the org.eclipse.cdt.core plugin plus my snippet plugin.

*: not sure about the answer to etiquette; don't have the reputation to do a lot of things. The comment field only accepts a small number of characters.

+3


source to share


1 answer


There's a more intuitive explanation (for me at least) on the OSGi Fragment bundle , which basically shows the result of what is achieved by the GUI operations in Eclipse. According to this Bundle-ClassPath

, the host manifests should be adapted if you want to replace or better: overlay the existing class.

See also OSGi Core Release 5 Specification, 3.14 Fragment Packages, page 69 ff for details.



You created your bundle with the Maven Bundle Plugin , right?

0


source







All Articles