1. 程式人生 > >eclipse project explorer 下面的字型怎麼更改大小

eclipse project explorer 下面的字型怎麼更改大小

轉自:http://bbs.csdn.net/topics/390817112#3329407-tsina-1-10510-f6e6a982b11a66de95e1610f5b2ad29a

當然,最新的eclipse luna已經自帶了dark theme,對比覺得應該就是把moonrise加進去了。

這時其 plugins\org.eclipse.ui.themes_1.0.0.v20140604-1608\css 資料夾下有多個跟dark相關的檔案。

應該是可以通過某個檔案的修改,程式碼加入以上幾行,完成目標。同時不需要安裝任何外掛!

應該是如果eclipse選擇的theme是win7,然後修改css裡面對應的e4_default_win7檔案
在stackoverflow中查到相關問題
參考以下網站:
http://stackoverflow.com/questions/3124629/how-can-i-configure-the-font-size-for-the-tree-item-in-the-package-explorer-in-e
http://stackoverflow.com/questions/14529727/i-cannot-change-the-font-size-of-package-explorer-eclipse/15011440#15011440

在檔案末尾新增以下幾行程式碼
#org-eclipse-jdt-ui-PackageExplorer Tree,
#org-eclipse-ui-navigator-ProjectExplorer Tree,
#org-eclipse-ui-views-ContentOutline Tree,
#PerspectiveSwitcher ToolBar {
  font-size: 8px;
}
可以奏效。

但我因為已經用了其他的 theme,遇到了另外一個問題。這個 theme 是一個 jar 包,放在 plugin 資料夾下。我解壓縮這個 jar 包後不作任何修改再用命令列的 jar cvf xxx.jar XXX 進行壓縮,放到 plugin 資料夾下面,已經和之前的 theme 不同。所以我在解壓縮 jar 包後的 css 檔案裡面作出修改,雖然能更改 project explorer 的字型大小,但原來 theme 已經被修改。

正在解決這個問題。
謝謝,這個方法可行,在mac上也可以了