Eclipse 設定

  • 8301
  • 0

Eclipse 設定

Eclipse 雖然是開發 Java 的利器, 但是有許多功能仍不如 Visual Studio 來的親民, 例如: #region 的程式碼摺疊功能、 Pascal Code Search、IntelliSense、Multi-Monitor...等等。

 

以下是針對開發 Java 時, 一些設定讓 Eclipse 更貼近 Visual Studio 的感覺:

 

1. Auto Complete:

Java -> Editor -> Content Assist -> Auto-Activation

2011-01-03_17-40-04

 

(1) 勾選 Enable auto activation
(2) Auto activation trigger to java 設定為 .abcdefghijklmnopqrstuvwxyz(,

 

2. Auto Format:

Java -> Editor -> Save Actions -> Perform the selected actions on save

 

2011-01-03_17-41-20

 

(1) 勾選 Format Source  -> 點選 Format all lines
(2) Organize imports (相當於 Visual Studio 的 Organize Using)

 

3. Code Style

Java -> Code Style –> Formatter

2011-01-03_17-44-05

 
(1) 按 New 透過現在有的 template 製作屬於自己習慣的 Code Style
(2) 按下 Edit 開始編輯

 

4. 設定字型

General -> Appearance -> Color and Fonts

2011-01-03_17-42-16
 
(1) 選擇 Java Editor Text Font
(2) 點擊 Edit ,編輯字型