2012-10-25 47 views
7

我在Eclipse中有一個錯誤。在遍歷代碼時,當它轉到另一個類時,編輯器失去焦點,我必須再次單擊編輯器才能繼續使用鍵盤快捷鍵進行調試。應用補丁修復Eclipse中的錯誤?

我發現這個thread描述了這個錯誤,並且有一個補丁修復它。有什麼方法可以應用該補丁嗎?我猜它涉及到源代碼。

回答

7

是的,你需要重新編譯模塊並安裝它。現在,使用git SCM以及使用Maven項目佈局和tycho插件,可以很容易地重建模塊(與幾年前的情況相比)。

讓現在看到:

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

補丁:

束/ org.eclipse.e4.ui.workbench.renderers.swt/SRC /組織/蝕/ E4/UI /工作臺/renderers/swt/StackRenderer.java

我們在谷歌搜索 「混帳org.eclipse.e4.ui.workbench.renderers.swt」 我們在URL結束:

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樹找到版本。這是爲了讓標籤或版本名稱/提交-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/ *子目錄,你可以關閉你Eclipse和把這個JAR到plugins文件夾,確保版本號是新的。

如果它的工作原理更新的bug報告。稱其爲你工作。

還可以考慮嘗試通過github帳戶推送它作爲新更改,並將原始作者記入帳戶。

..

免責聲明:以上是關於你將如何實現你想要的本金。完成時間可能不到5分鐘。但是也有可能出現複雜情況,您需要獨立研究這些問題(如果有的話)。

你也可以使用Eclipse本身做很多上述工作,'git checkout'和'build Eclispe plugin module',儘管對於這個改變我可能需要更長的時間,也許15分鐘(如果沒有併發症)。

+0

感謝您的答案。我還沒有使用GIT,但我會找回你,一旦我找出你說的話:) –