在開發EXT中,我分別使用了Aptana和Spket
一、Spket的安裝
1、Plugin:
最低要求: eclipse平台運行時3.2.x ,
檔案為: spket-1.6.4.1.zip(與別的外掛程式的安裝無異,相信不用我多說了吧
2、Spket IDE:
最低要求:你需要java 1.5或更高版本運行安裝程式,可獨立使用(不用裝Eclipse
檔案為:spket-1.6.4.1.jar
安裝步驟:1、開啟cmd,2、在spket-1.6.4.1.jar檔案目錄下輸入java -jar spket-1.6.4.1.jar
3、斷行符號(相信你已看到安裝畫面
3、Update Site
這是更新網站,為spket的ide 。
使用它,開啟eclipse的updatemanager (在eclipse下的協助菜單) ,並新增一個書籤為:
http://www.spket.com/update
二. Spket的配置與使用
建立jQuery profile
- 選擇功能表項目中Window > Preferences...
- 選擇spket > javascript Profile頁面
- 點擊new...按鈕。在名稱裡面,寫入jquery。然後單擊確定。
- 點擊Add Library 按鈕. 從Library下拉式清單中, 選擇jquery 。然後單擊確定。
- 點擊Add File 按鈕, 選擇jquery.js 可從jquery.com下載(也可用附件裡的)。
- 選擇jQuery profile 按照第3步, 點擊Default 按鈕把它預設為 default 項. The default profile 也可通過配置每個項目利用 Configure Project Specific Settings... 配置。
- 點擊OK儲存preference。
建立EXT 2.0 profile ,用Spket進行Ext2.0開發
將以下代碼放入檔案ext.jsb的標記 </project>之前
<target name="Ext Base">
<include name="core\Ext.js" />
<include name="adapter\yui-bridge.js" />
<include name="yui\yahoo.js" />
<include name="yui\dom.js" />
<include name="yui\event.js" />
<include name="yui\connection.js" />
<include name="yui\animation.js" />
</target>
- 選擇功能表項目中Window > Preferences...
- 選擇spket > javascript Profile頁面
- 點擊new...按鈕。在名稱裡面,寫入EXT。然後單擊確定。
- 點擊Add Library 按鈕. 從Library下拉式清單中, 選擇EXTJS 。然後單擊確定。
- 點擊Add File 按鈕, 選擇ext源碼裡的 ext\source\ext.jsb
- 點擊OK儲存preference。
接著,你就可以在js代碼中自動提示代碼
Ext Theme Builder
在project目錄下,建立一個檔案,檔案名稱為ext.theme,開啟檔案,指定ext的resource檔案夾路徑,就可以調整ext介面的顏色,效果等,產生自己的css檔案
spket自訂指令碼的引用申明及提示
1. 首先在當前js檔案頭部使用spket的包含文法引入包含的js:
/**
* @include "../js/custom.js"
*/2.按 ctrl+click即可開啟js申明,或ctrl+/ 自動完成提示