eclipse - 应用补丁来修复 Eclipse 中的错误?

标签 eclipse ide

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

我找到了 thread描述错误,以及修复它的补丁。有什么方法可以应用补丁吗?我猜它涉及拥有源代码。

最佳答案

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

现在让我们看看:

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

补丁:

bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java

我们在 google 上搜索“git org.eclipse.e4.ui.workbench.renderers.swt”,最终得到以下 URL:

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

这可用于 checkout 要构建的 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 树可能会有所帮助。这是为了获取标签或版本名称/提交 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/* 子目录中查找 .jar,您可以关闭 eclipse 并将此 JAR 放入 plugins 文件夹中,确保版本号更新。

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

还可以考虑尝试通过 github 帐户推送它作为新的更改,归功于原作者。

..

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

您也可以使用 Eclipse 本身、“git checkout”和“构建 Eclispe 插件模块”来完成上述大部分工作,尽管对我来说,这个更改可能需要更长的时间,可能需要 15 分钟(如果没有并发症的话)。

关于eclipse - 应用补丁来修复 Eclipse 中的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13066098/

相关文章:

java - 未能执行目标 org.apache.maven.plugins :maven-compiler-plugin (default-compile) on project: Fatal error compiling: tools. 未找到 jar

java - 执行 MVN 安装时出现未知主机错误

git - 如何从 NetBeans IDE 中删除 Git 远程分支?

eclipse - Eclipse:选择“在服务器上运行”不会启动Firefox,它会启动Eclipse的内部浏览器

c++ - 我可以通过哪些方式从 Windows 工作站在 Linux 中开发 C++ 应用程序?

java - 为什么 Eclipse 警告我添加serialVersionUID?

java - Jackson lib gradle 的 Eclipse 类路径问题

java - Spring Tool Suite 3.6.2 无法添加服务器适配器 Oracle Weblogic Server 10.3.5

unit-testing - 如何在 Visual Studio 2012 Professional 中连续运行单元测试?

Java 套接字 - 使用 IDE 时出现意外行为