Eclipse 中雙擊變量不高亮 切換變量不高亮 解決

在eclipse/myeclipse中如果不小心把變量的高亮顯示弄丟了。可真是件愁人的事,不過看到這你就不用愁了

windows->   preferences-> java-> Editor-> Mark   Occurences 

最上邊的大標題的複選框勾上,下面的就都可以高亮顯示了,Local   variables是變量的高亮顯示

還有其他的一些高亮的

alt+shift+o 也可以打開關閉這個



======================== 以上是設置


 下面的是切換變量的時候不高亮 ---測試可以


http://blog.csdn.net/ritterliu/article/details/19087431


參考自 stackoverflow

Two "solutions" that at least get the highlight stuck on a new item (!!):

  1. As @Subas Raj mentioned, defocus and refocus the window - when you come back, your current position is occurrence-highlighted. Either hit AltTab twice, or use your mouse to click/focus some other window, then back.
  2. As @Leo and @Gorky mentions, hit AltShiftO twice. This is the shortcut for toggling highlight occurrences, and when you turn it back on, your current position is occurrence-highlighted.

And finally, a third ACTUAL solution: Replace one specific jar with a patched one:https://bugs.eclipse.org/bugs/show_bug.cgi?id=398509#c60

說是雙擊變量後,不高亮, 但是當窗口的focus變化了,就會高亮了,這是Eclipse的一個Bug, 解決方法就是將eclipse/plugins/ 目錄下的 org.eclipse.e4.ui.workbench_0.11.0.v20130125-100758.jar 替換下。 

親測可行, 就是反應略卡。


發佈了93 篇原創文章 · 獲贊 54 · 訪問量 67萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章