windows中一般不會出現這個問題,一般是裝linux的eclipse 版本,默認不會自動開啓代碼提示功能,需要你自己設定,這也是我很想不通的一點,但事實就是如此!!
Eclipse版本(本文測試)
Eclipse IDE for Java Developers
Version:Indigo Service Release 1
Build id: 20110916-0149
配置步驟:
1 Window > Preferences > Java > Editor > Content Assist
2 “Auto Activation triggers for java”這個選項就是指觸發代碼提示的的選項,
把“.”修改成".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
意思就是指遇到26個字母的大小寫和.(這些符號就觸發代碼提示功能了)
配置截圖:
1、菜單window->Preferences->Java->Editor->Content Assist->Enable auto activation 選項要打上勾
2、windows-->preference-->workbench-->keys 下設置Content Assist 的快捷鍵
3、window->Preferences->Java->Editor->Content
Assist->Advanced 上面的選項卡Select the proposal kinds contained in the
'default' content assist list: 中把 Other Java Proposals 選項打上勾就可以了