Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Patching a CDT plugin

On 03/17/2014 01:43 PM, Guy Bonneau wrote:

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 ?

If I understand things correctly, then it's not a good idea to mix various versions of CDT, as mentioned by my working colleague here: http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg27030.html and confirmed by this http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg27031.html message.

 

Guy

 

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: Friday, March 07, 2014 3:46 PM
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] Patching a CDT plugin

 

I haven’t looked into this in a while, but a Feature Patch may be of interest.

I believe it will allow you to install a new version of the feature that is giving you trouble, replacing only the plugins you have changed.

I found this blog but there are maybe better ones:

http://eclipsesource.com/blogs/2012/07/30/patching-your-own-eclipse-ide/

 

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Guy Bonneau
Sent: Friday, March 07, 2014 7:59 AM
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] Patching a CDT plugin

 

Thanks Doug.

 

I am not sure I have understood what both Sergey and you are trying to tell me. You seems to say there is another way than using fragment. Unfortunately I don’t have much know how of Maven. That’s not my cup of tea but I am open to dig in it.   Could you please elaborate? The implementation of the toolchain includes 2 plugins and 2 fragments. I expected to fix the issues of CDT by including in the toolchain plugin a fragment for every plugin of the CDT that needed to be patched. Thus I would expect an end user that already installed CDT to install the toolchain plugin that contains the fragments to patch the CDT issues. Is there a better/cleaner way to do this ?

 

Guy

 

 

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
Sent: Friday, March 07, 2014 2:34 AM
To: cdt-dev@xxxxxxxxxxx; CDT General developers list.
Subject: Re: [cdt-dev] Patching a CDT plugin

 

We do the same thing as Sergey and build the platform and CDT bits we need. That's the beauty of Maven.

 

Of course we contribute back any changes we make for the next release so we don't have to keep doing that.

 

Doug.

 

Sent from my BlackBerry Z30

From: Sergey Prigogin

Sent: Friday, March 7, 2014 1:51 AM

To: CDT General developers list.

Reply To: CDT General developers list.

Subject: Re: [cdt-dev] Patching a CDT plugin

 

I don't think modifying the manifest is necessary.

 

-sergey

 

On Thu, Mar 6, 2014 at 8:15 PM, Guy Bonneau <guy.bonneau@xxxxxxxxxxxx> wrote:

Thanks Sergey,

 

But rebuilding the whole CDT to provide a fix to a few classes seems to be overkill to provide a new CDT toolchain. Even if I could do it then requesting an end user to reinstall the whole CDT would create an headache to the tech support.

 

I understand the issue of versioning as well. But the classes I need to modify are stable since a few years and I don’t expect any changes in the short term. Thus I believe using the fragment strategy seems at first glance to be my best trade-off.  This is why I am asking if the use of a fragment patch can be done without having to modify the manifest of a host CDT plugin that is already installed within the Eclipse Platform of an end user? If this is not possible then I understand why you suggested to build the whole SDK. That would make sense.

 

Thanks

Guy

 

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Sergey Prigogin
Sent: Thursday, March 06, 2014 10:39 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Patching a CDT plugin

 

Fragments make version upgrades very hard. We used to use fragments for platform patches and abandoned this approach in favor of building the whole Eclipse SDK ourselves.

 

-sergey

 

On Thu, Mar 6, 2014 at 7:24 PM, Guy Bonneau <guy.bonneau@xxxxxxxxxxxx> wrote:

I am developing a commercial plugin that use Eclipse’s CDT and need to patch 3 CDT plugins to fixe some issues I already reported on Bugzilla without which the usage of the plugin will fail.

 

I have reviewed the thread of Joseph Henry about the distribution of custom patches: https://dev.eclipse.org/mhonarc/lists/cdt-dev/msg26205.html . I have also read some info posted on Eclipse Wiki about how to use fragment to patch a plugin: https://wiki.eclipse.org/RAP/Patch_Fragments and https://wiki.eclipse.org/Steps_to_use_Fragments_to_patch_a_plug-in as I am struggling to choose a strategy for this.

 

Now regarding the strategy of using a fragment to patch a plugin. It is not clear to me if the manifest of the host plugin must be modified with the attribute Eclipse-ExtensibleAPI: true. If the Host Manifest need to be modified obviously I cannot ask an end user to do this. This would be an insane way to patch a plugin.

 

Can anyone shade some light regarding this?

 

Thanks

Guy


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

 


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

 



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top