简体   繁体   English

如何修补eclipse插件?

[英]How to patch an eclipse plugin?

I'd like to fix a bug in an eclipse plugin (an official plugin of the WTP). 我想在eclipse插件(WTP的官方插件)中修复一个错误。 I locally changed the source code, debugged it - everything is fine. 我在本地更改了源代码,调试了它 - 一切都很好。

Now I'd like to propagate this change to my eclipse installation, but I am facing problems. 现在我想将此更改传播到我的eclipse安装,但我遇到了问题。 There seems to be more than one way to achieve this, eg: 似乎有不止一种方法可以达到这个目的,例如:

This site recommended fragments, but the Eclipse FAQ disadvises that. 这个站点推荐了片段,但是Eclipse FAQ忽略了这一点。

But I am stuck and no way seems to work for me. 但我被困住了,似乎没有办法对我有用。

UPDATE: 更新:

I tried to create and install a feature patch, as suggested. 我按照建议尝试创建并安装功能补丁。 After this installation the feature patch is installed, but not the containing patched plugin. 安装完成后,将安装功能补丁,但不会安装包含补丁的插件。 The previous/existing version of the plugin is still present and active. 插件的先前/现有版本仍然存在且处于活动状态。

I'd like to know why this is the case? 我想知道为什么会这样吗? Does this something have to do with signing of the official plugins? 这件事与签名官方插件有关吗? Is there a log to see why the patched plugin has not been installed? 是否有日志可以查看未安装修补插件的原因?

FINAL UPDATE: 最终更新:

The problem was that I patched a parent feature (which has been shown in the eclipse installation details), not the direct feature which directly contained the plugin. 问题是我修补了一个父功能(已经在eclipse安装细节中显示),而不是直接包含该插件的直接功能。 After specifying the correct/"lowest-level" feature for patching, everything worked as expected. 在为修补指定正确/“最低级别”功能后,一切都按预期工作。

The best approach is to create what's known as a "feature patch". 最好的方法是创建所谓的“功能补丁”。 A feature patch consists of the entire new version of the plugin you are patching along with a feature that describes what's being patched. 功能补丁包含您要修补的插件的整个新版本以及描述正在修补的内容的功能。 See this useful blog post: 看到这篇有用的博文:

http://aniefer.blogspot.com/2009/06/patching-features-with-p2.html http://aniefer.blogspot.com/2009/06/patching-features-with-p2.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM