1、Eclipse顏色設定在菜單Windows -> Preferences,1所示。
圖1、Preferences
2、General -> Appearance -> Colors and Font,2所示。
圖2、Colors and Font
可在此進行字型設定。
3、General -> Editors -> Text Editors,3所示。
圖3、Text Editors
具體描述如下:
Line number foreground行號前景色彩設定
Current line highlight當前行醒目提示設定
Print margin列印頁面邊界顏色設定
Find scope尋找範圍顏色設定
Selection foreground color選擇的內容的前景色彩設定
Selection background color選擇的內容的背景色設定
Background color背景色設定
Foreground color前景色彩設定
Hyperlink超連結顏色設定
4、General -> Editors -> Text Editors -> Annotations,4所示。
圖4、Annotations
C/C++ Occurrences C/C++游標處變數醒目提示設定
5、C/C++ -> Editor,5所示。
圖5、Editor
具體描述如下:
Matching brackets highlight匹配括弧醒目提示設定
Inactive code highlight不活動代碼高亮(例如#if條件不成了的語句)
Completion proposal background自動補全視窗的背景色設定
Completion proposal foreground自動補全視窗的前景色彩設定
Parameter hint background
Parameter hint foreground
Source hover background Source懸停視窗背景色設定
6、C/C++->Editor->Syntax Coloring,6所示。
圖6、Syntax Coloring
具體描述如下:
C/C++
-----Editor編輯器
-----------Syntax Coloring文法著色
--------------------------Enable semantic highlighting使能文法高亮
--------------------------Element元素
---------------------------------Code代碼
-------------------------------------Braces括弧
-------------------------------------Built-in types內建類型名
-------------------------------------Classes, Structs, Unions類, 結構體, 聯合體
-------------------------------------Enumerators枚舉元素
-------------------------------------Enums枚舉類型
-------------------------------------External SDK calls外部軟體開發套件調用(例如:stdio.h中的printf)
-------------------------------------Fields位域bit-fields
-------------------------------------Function declarations函數名聲明(定義)
-------------------------------------Functions函數名(引用)
-------------------------------------Global variables全域變數
-------------------------------------Keywords關鍵字(不包括內建類型名)
-------------------------------------Labels標籤
-------------------------------------Local variable declarations局部變數定義
-------------------------------------Local variable references局部變數引用
-------------------------------------Macro definitions宏定義
-------------------------------------Macro references宏引用
-------------------------------------Method declarations類中的方法聲明
-------------------------------------Methods方法引用
-------------------------------------Namespaces
-------------------------------------Numbers數值
-------------------------------------Operators操作符
-------------------------------------Others其他----不知道為什麼結構體的名稱竟然屬於其他
-------------------------------------Overloaded Operators重載操作符
-------------------------------------Parameter variables函數形參變數
-------------------------------------Problems
-------------------------------------Static fields 靜態位域(Static bit-fields)
-------------------------------------Static method invocations
-------------------------------------Strings字元和字串
-------------------------------------Template parameters
-------------------------------------Typedefs使用typedef聲明的類型
---------------------------------Assembly組合語言
-----------------------------------------Directives指令
-----------------------------------------Labels標籤
---------------------------------Comments注釋
-----------------------------------------Multi-line comment多行注釋
-----------------------------------------Single-line comment單行注釋
-----------------------------------------Task Tags任務標記
---------------------------------Preprocessor預先處理
---------------------------------------------Directives指令(#號開頭的預先處理指令)
---------------------------------------------Headers標頭檔
---------------------------------------------Others其他
---------------------------------Doxygen
----------------------------------------Doxygen Multi-line Comment
----------------------------------------Doxygen Single-line Comment
----------------------------------------Doxygen Tag
1.Braces括弧
() [] {}
2.Built-in types內建類型名
char double
float int
long
short signed
unsigned void
_Bool
_Complex _Imaginary
3.Classes, Structs, Unions類, 結構體, 聯合體(C++)
4.Enumerators枚舉元素
enum TEST {ZERO, ONE, TWO} test;
例子中的ZERO, ONE, TWO為枚舉元素
5.Enums枚舉類型
enum TEST {ZERO, ONE, TWO} test;
例子中的TEST為枚舉類型
6.External SDK calls外部軟體開發套件調用
例如:調用stdio.h中的printf函數
7.Fields域
指在struct或union中定義的成員變數
8.Function declarations函數名聲明和定義
9.Functions函數名調用
10.Global variables全域變數
11.Keywords關鍵字(不包括內建類型名)
auto break
case const
continue
default do
else enum
extern
for goto
if inline
register
restrict return
sizeof static
struct
switch typedef
union volatile
while
12.Labels標籤
13.Local variable declarations局部變數定義
14.Local variable references局部變數引用
15.Macro definitions宏定義
16.Macro references宏引用
17.Method declarations類的方法聲明(C++)
18.Methods類的方法引用(C++)
19.Namespaces(C++)
20.Numbers數值
21.Operators操作符
22.Others其他(不知道為什麼結構體的名稱竟然屬於其他)
23.Overloaded Operators重載操作符(C++)
24.Parameter variables函數形參變數
25.Problems(不清楚是什麼用)
26.Static fields 靜態域
指在struct或union中用static定義的成員變數
27.Static method invocations(C++)
28.Strings字元和字串
29.Template parameters(C++)
30.Typedefs使用typedef聲明的類型