在Aptana Studio上开发时发现,Aptana 没有针对ST的代码提示,确实是一大遗憾。网上搜了下,发现解决的方式也还简单。希望对有同样问题的攻城师有所帮助。
环境:Aptana Studio 3, build: 3.0.6, sencha-touch-1.1.1
步骤:
1.在 Aptana Studio打开 Help -> Install New Software
2. 单击 "Add" 添加一个 repository
- Name: Spket IDE
- Location: http://www.agpad.com/update
3. 在 "Work with:" 列表中选中所有找到的内容进行安装,列表有3个 repositoryes(Spket IDE, Spket Text Editor 和 Xerces for Spket IDE)。
4. 下载 http://www.agpad.com/downloads/com.spket.js_1.6.18.jar
5. 用下载的com.spket.js_1.6.18.jar替换 [你的Aptana安装目录]\Aptana Studio 3\plugins路径下的文件。这是因为,Spket 只支持 "jsb1" and "jsb2"格式,但Sencha Touch使用的是"jsb3",因此要让Spket 支持"jsb3"才行。
6. 在Aptana Studio中打开 Windows -> Preferences -> Spket -> Javascript Profiles
- 单击"New"并且输入 "SenchaTouch"
- 选中 "SenchaTouch" 单击 "Add Library" 在列表中选中 "ExtJs"
- 选中 "ExtJs" 单击 "Add File"
找到 "sencha-touch.jsb3" 文件。这个文件在从sencha.com下载的sencha-touch-1.1.1.zip文件中。
....然后单击 "Open"
- 选中 "SenchaTouch"后单击 "Default"按钮
- 最后点 "OK"就大功告成。
打开js 文件,输入Ext. 果然代码提示出来了
Sencha Touch 2 Autocomplete example in Aptana Studio
December 11, 2012, Shereef Marzouk, 16 CommentsToday i was trying to get into Sencha Touch 2 but i couldn’t get into it because i didn’t have my CRTL + Space working!
So i have tried various stuff all day until i reached a solution so i thought i would post it:
First of all i would like to thank Gehad Mohamed for putting me on the correct path, and of course these questions on stack over flow, ide for sencha and sencha touch ide or editor.
Before we start please download the following files:
- sencha-touch-2.0.0-gpl.zip or sencha-touch-2.0.0-commercial.zip
- SenchaSDKTools-2.0.0-beta3
- Aptana Studio 3
Sencha Touch 2 Autocomplete example in Aptana Studio:
- Extract sencha-touch-2.0.0-(gpl.zip/commercial.zip) to a place of your liking (Note it will stay there for a long time)
- SenchaSDKTools-2.0.0-beta3 and/or install it
- open up the terminal or command prompt
- cd into the folder of Sencha Touch SDK (sencha-touch-2.0.0-(gpl/commercial)
- write:
- sencha generate app APP_NAME APP_PATH
- hit enter (return)
- extract/install Aptana studio
- Open up Aptana studio
- Click the help menu
- Choose Install New Software
- A window will open click Add
- Name it Spket IDE then enter the url http://www.agpad.com/update
- Press OK
- Choose everything then click Next
- Click next
- Read the license ( like everyone does, NOT!), and then accept if you want, then press next
- Wait for the install to complete (Restart if required)
- Go to Preferences (the image is from a mac, figure it out on windows!)
- Navigate to Spket then JavaScript Profiles
- Click Add
- Type Sencha
- Press Ok
- Highlight Sencha
- Click Add Library, Select ExtJs
- Highlight ExtJs then click Add file
- Choose touch.jsb3 from the folder you extracted the Sencha Touch SDK 2.0.0 in
- Select all items in the tree
- Highlight Sencha then click default
- Press ok
- File > New > Other > General > Project
- uncheck the box that says to use the default location
- Browse to the project you created earlier
- Type the name of the project (preferably exactly the same name as it’s folder)
- Press finish
- expand the view folder and open the Main.js
- type Ext. if the auto complete doesn’t pop up type crtl + space
- Comment and tell me what happened (good or bad)
P.S. All files are backed up on my github
P.S. Don’t try using eclipse, i already did and it didn’t work, only works with aptana.
this concludes my sencha touch 2 autocomplete example in Aptana Studio