本文截取自E-Office學園
用Aptana開發Javascript一定要享用一下它的Code Assist功能。
這裡以jQuery為例,
看一下Code Assist如何幫助開發。
先打開Eclipse吧!
1.Window->Show View->Other
2.Aptana Standard Views->References
3.看到新的References View了!(等等說明幹啥用的)
4.在你的Web Project上按右鍵->Import
5.Other->Ajax Library Import Wizard
6.勾選jQuery(如果要用別的就勾別的)
接著我開啟一個HTML檔(chkAccount.html)示範一下。
這個HTML檔引入了兩個js檔案(jquery.js、chkAccount.js)。
注意Preferences View(之前開啟的)!
出現chkAccount.html資料夾(profile),
裡面有引入的兩個js檔案(jquery.js、chkAccount.js)。
在chkAccount.html資料夾(profile)按右鍵->Make Current Profile
這表示現在開啟編輯的檔案(假設是chkAccount.html),
在寫Javascript時,
Code Assist功能啟動後,
會參照到這個profile裡的js檔案。
至於Preferences View中下方的Global References,
勾選的項目是即使你沒有引入也會自動參照的profile。