eclipse常用設置

1,設置默認的全局JRE:
Window->Preferences-> Java -> Installed JREs ,這樣每次新建項目時,默認的JRE庫即爲選中的項。
476d94c0-8071-3923-9d8e-055327e91659.jpg
2,設置工作空間全局編碼:
設置UTF-8 Window->Preferences->General->Workspace 中Text file encoding 選擇other並選UTF-8
d65da06d-012e-30c4-be5b-275f907156a5.jpg
3,修改文件默認編碼:
Window -> Preferences -> General -> Content Types
【注意是修改最下面的Default encoding】,在這裏可以將html、properties和jsp文件的編碼都改成UTF-8的。
這樣修改後,以後每次新建properties並保存時,就不會跳出一個對話框說你現在的編碼是ISO-8859-1的提示了。
c1e08f39-a904-387e-a581-a54036ff6e76.jpg
4,修改特定文件的編碼:
Window -> Preferences -> MyEclipse -> Files and Editors -> JSP
比如這裏修改JSP的頁面顯示編碼爲UTF-8,那麼每次新建一個jsp文件後,第一行的編碼設置內容就會像這樣所示:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
740e9e03-309e-36bb-b17b-41a92b7dd229.jpg
5,設置字體:
Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Text font
e693cdeb-67ea-3887-9096-39b4e77ee8fd.jpg
6,設置文件默認編輯器:
Window -> Preferences -> General -> Editors -> File Associations
bf9f62aa-f959-3ed1-b3fc-7258bc729de8.jpg
7,設置當鼠標移到文字上時的事件:這裏選擇快速顯示註釋。
Window -> Preferences -> General -> Editors -> Text Editors -> When mouse moved into hover.
1ea252de-d8a2-36a4-b791-fda88053c943.jpg
8,設置快捷鍵:
Window -> Preferences -> General -> Keys
輸入要設置的動作的名稱,比如這裏輸入“run java”進行過濾,然後在Binding選項中設置快捷鍵。
這樣以後每次要運行java程序時,只需要按 Alt+X 快捷鍵就可以了。
3d853e92-dfc5-3057-9ce5-1fcd13ad3857.jpg
9,禁用啓動時不需要的插件:
Window -> Preferences -> General -> StartUp and Shutdown
比如Myeclipse Derby,老是在Server控制檯佔着茅坑不拉屎,看着蛋疼,先把它給治了。
a4e6651e-c972-3541-bd13-d505b7318fb9.jpg
10,設置註冊碼:
Window -> Preferences -> MyEclipse -> Subscription
14054429-1a2d-3243-a8dd-ccfa99949caa.jpg
11,增強Eclipse的自動代碼提示功能(摘自網絡):
默認下, 只有按"."或"Alt + /"纔出現代碼提示功能, 不夠強大, 作小小設置, 可將代碼提示功能像VS的一樣方便
1. Window -> Preferences -> Java -> Editor -> Content Assist
2. 將"Auto Activation triggers for java"設置爲".abc"(默認是"."), 點"Apply"應用
3. 導出目前的Eclipse配置文件: File -> Export -> General -> Perferences, 選擇保存路徑, 保存得到*.epf文件
4. 用文本編輯器打開剛纔保存的*.epf文件, 搜索".abc", 將".abc"部分改爲
".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(," (以上爲自動提示的觸發字符,
根據個人習慣設置), 保存此配置文件(個人覺得不太好用,容易出錯)
5. 導入此配置文件: File -> import -> General -> Perferences, 導入修改後的配置文件.
12,關閉自動更新:
Myeclipse有時一打開就在Progress中無休止地更新,必須把它給做了。
1. window --> preferences --> General --> Startup and Shutdown,
去掉 "Automatic Updates Scheduler " 項前面的勾。
2. Window --> Preferences --> Myeclipse Enterprise Workbench --> Maven4Myeclipse --> Maven --> "Download repository index updates on startup", 去掉前面的勾。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章