应用补丁来修复Eclipse中的bug?

时间:2012-10-25 09:59:58

标签: eclipse ide

我在Eclipse中有一个错误。当单步执行代码时,当它转到另一个类时,编辑器失去焦点,我必须再次单击编辑器以继续使用键盘快捷键进行调试。

我发现这个thread描述了这个bug,还有一个修补它的补丁。有什么方法可以应用补丁吗?我猜它涉及到源代码。

1 个答案:

答案 0 :(得分:8)

是的,您需要重新编译模块并进行安装。这些天使用git SCM以及使用Maven项目布局和tycho插件,可以很容易地重建模块(与几年前的模块相比)。

让我们看看现在:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=372941

补丁:

束/ org.eclipse.e4.ui.workbench.renderers.swt / SRC /组织/蚀/ E4 / UI /工作台/渲染器/ SWT / StackRenderer.java

我们搜索google“git org.eclipse.e4.ui.workbench.renderers.swt”,我们最终会在网址上找到:

https://git.eclipse.org/c/platform/eclipse.platform.ui.git/

这可用于签出要构建的1个模块。

默认情况下,Git可用于许多Linux发行版,谷歌你的ditro名称和“安装git”术语以获得最佳帮助。在Windows上有https://code.google.com/p/msysgit/,在MacOSX上有https://code.google.com/p/git-osx-installer/所有这些都提供了一个命令行环境来使用git。您可以查看Eclipse本身的EGit / JGit插件,以便完成这项工作。但是下面的说明适用于命令行方法。

git clone https://git.eclipse.org/c/platform/eclipse.platform.ui.git

现在,您需要查找正在使用的版本的已标记版本。所以你需要在Eclipse安装的eclipse / plugins / **文件夹中找到它。版本号可能在文件名或MANIFEST.MF或其他* .xml文件中,版本号通常表示源的日期和/或构建的数字。

浏览上面的eclipse.org网站链接可能有助于GIT树找到版本。这是为了获取标签或版本名称/ commit-id(如'abc1234':

# List tags (might see it in the list)
git tag -l
# Look through history, maybe you can work on the date
git log
# Finally once you know the version you want 
# checkout the exact version that goes with your eclipse install
git checkout -b mylocalbranch <tag_or_version>

现在你可以使用Maven来构建它了。

cd eclipse.platform.ui.git
mvn package
# The full-monty would be: mvn deploy  (or 'mvn install')
# But I am not sure if unit and integration tests will work this easily, using
# the 'mvn package' it enough to get you the JAR you need to install in Eclipse.

现在您可以在build / * subdir中查找 .jar,您可以关闭eclipse并将此JAR放入plugins文件夹,确保版本号更新。

如果有效,请更新错误报告。说它对你有用。

另外考虑尝试通过github帐户推送它作为一项新的更改,并将原作者归功于此。

...

免责声明:以上是关于如何实现您想要的目标的原则。完成时间可能不到5分钟。但是可能有并发症,你需要独立研究这些(如果你得到的话)。

您也可以使用Eclipse本身执行上述操作,“git checkout”和“构建Eclispe插件模块”,虽然对于我来说这个更改可能需要更长时间,可能需要15分钟(如果没有并发症)