September 4, 2008 5:16 PM
Ubiquity is awesome. I just cooked up a set of three ubiquity commands useful for Flex and Flash developers. as3desc for showing the description of an Actionscript class, as3package for showing the package to which a class belongs to and the most useful of all the commands: as3livedocs that takes you to the online documentation page given an Actionscript class. Much of this functionality was written for flexbot, porting them for use in ubiquity was a snap.
I've always wanted an easy way to get to the Livedocs page given a class name. Usually, I type the class name followed by "livedocs flex" into google. The first link that pops up might belong to another livedocs page in which the class is mentioned or I might be lucky and end up with the correct livedocs page.
With the as3livedocs command, in Firefox, I can simply press Control + Space1, type:
Voila! the correct livedocs page will open up in Firefox on a new tab.
Another common task is to look up the description and package of a class. These are handled by the as3desc and as3package commands respectively. as3desc classname will show the description of the class in ubiquity's preview window and on execution, will replace selected text in the browser with the description. Also, if you're typing in a text area, type DataGrid, select the word, press Control + Space, type as3desc, hit Enter and the class name will be replaced by its description. Neat!
All three commands do not make any networking calls though as3livedocs opens up a new tab with a URL.
If you have Ubiquity set up, go to this link and a Subscribe button should be coming up on the top right of that page. Hit on Subscribe to add these commands.
 Fellow Emacs fans, change Control + Space to Alt + X. :)