標籤:
1、次方法用於沒有一點提示的情況:依次開啟eclipse上面的windows ——preferences ——java ——editor —— content assist ,在右上方有一行“select the proposal kinds contained in the ‘default‘ content assist list” 下面,勾選Java Prolosals 複選框,儲存退出即可。
2、此種方法用於打出單詞縮寫沒有提示的情況(例如:打出syso沒有提示):依次開啟eclipse上面的windows ——preferences ——java ——editor —— content assist,在右邊部分偏下的地方找到“Auto activation triggers for java:”這一項,後面是一個文字框,在後面的文字框輸入字母abcd,然後點擊 applay-->OK 儲存退出,選擇匯出 File —— General —— Export 選擇preferences 再選中Export all 複選框(下面的不需要管),並指定匯出檔案的名字和路徑(注意只能匯出.epf格式的檔案)。然後在你指定的路徑下找到剛剛匯出的檔案epf檔案,(可以用記事本)開啟它,再找到剛剛輸入的abcd(或者abc),再在其後添加其餘的22個英文字母,儲存後,再用eclipse的匯入功能把該檔案匯入到eclipse中,就可以實現單詞聯想提示功能。
但是我的Eclipse還是原來的樣子,所以繼續試試其它的方法:
3、依次開啟eclipse上面的windows ——preferences ——General —— Keys, 在Scheme的下面有一個搜尋方塊,在搜尋方塊裡面輸入“Content asist”(我的Eclipse在這個搜尋方塊裡不能輸入,下面的按鈕搶佔了焦點,所以我選擇了複製粘貼,注意搜尋時注意大小寫),選中“Content asist”這一項後,將Binding項改為“ALT+/”(按下“/”鍵即可更改),將When項選擇成Editing Text即可;
4.依次開啟windows ——preferences ——java ——editor —— content assist —— advanced,選中右下方複選框的Template Proposals一項即可。
<
5、一般情況下alt+/有代碼提示作用,還有代碼提示的快捷代碼也不是alt+/,因此要恢複代碼提示用alt+/.需要做兩件事.在 Window - Preferences - General - Keys 內
把word completion的快速鍵設定alt+C
把Content Assist的快速鍵由ctrl+space改成alt+/
如果還是不提示,極有可能是提示功能被關了.
菜單window->Preferences->Java->Editor->Content Assist->Enable auto activation 選項要打上勾
window->Preferences->Java->Editor->Content Assist->Advanced 上面的選項卡Select the proposal kinds contained in the ‘default‘ content assist list: 中把 Other Java Proposals 選項打上勾就可以了
【轉】elipse的代碼提示小結