I’ve been using Accelerator Titanium to create iPhone applications in JavaScript. One thing JavaScript is missing is really good editor with autocompletion / code completion. I recently found Aptana and wanted a way to autocomplete from the Titanium API in that. I’ve created ScriptDoc compatible JavaScript header file that does the job.
Installation
1) Install Aptana standalone or as an eclipse plugin.
2) Download the javascript header file
3) Switch to the Aptana perspective in eclipse
4) Set Aptana as the default javascript editor in preferences
5) Add the timobile.js to the references
Other points of interest:
- You can download the PHP file here that I use to create the JavaScript header file from the Titanium API JSON file.
- I’m working on an Eclipse plugin, you can view the source here.
- If you’re wondering why there are function names like Titanium_UI_Window, these are to act as dummy return types, because Aptana ScriptDoc didn’t allow me to return an Object in a name space like Titanium.UI.Window.
- Mbirth has a JSDoc code completion file here, but Adobe no longer seem to distribute JSEclipse so I’m not sure how it would work in Eclipse.