ActiveState Powered by ActiveState

ActiveState Community


Creating API Catalogs

Posted by tonisk on 2007-01-31 08:36
OS: All / Any

I'd like to create API Catalog for mootools (http://mootools.net/) javascript framework. How can this be done? These .cix files seem pretty complex xml.

tonisk | Thu, 2007-02-01 15:25

Is it even possible to automatically create usable completition for this kind of javascript code. It uses too abstractions and anonymous functions.

Completition and calltips arent working right even when dropping mootools to project direcory.

ToddW | Fri, 2007-02-02 09:09

To have better codeintel for mootools, it will require writing a specific CIX (CodeIntel XML) module that covers the mootool library (like what Komodo is doing for YUI, prototype, Dojo, etc...). We are going to document this CIX codeintel structure, and later, some tools to help build CIX API catalogs, we shall let everyone know when we have this ready.

We will be looking at adding additional JS libraries to Komodo, and mootools was one of the ones we've already looked at and discussed. If there are enough people who use and want this support in Komodo, then we will certainly add support for it.

Note:

It should be possible to add the uncompressed+commented mootools code to your global/project JS directory includes, then it should have some completions for at least some parts of mootools. Open mootools.js and check what is displayed in the Code Browser, those items are what you should get completion for.

The JS file parsing/scanning will miss some things in mootools (Note: it does not execute the JS code). Mootools uses function calls to setup the API at runtime, and there is not much hope that a scanner can deduce what a function does to javascript objects:

var Event = new Class({ // class data ... });
// and
Object.extend(...);
var Event = new Class({ // class data ... });
// and
Object.extend(...);

JustinW | Fri, 2007-02-02 10:27

In the meantime, any chance you could publish the xml schema? I might have some free time on my weekends this month to reconfigure one of my generalized parsers to make a catalog for PHP.

willydee | Sun, 2007-02-18 18:32

I second JustinW's request. Please tell us the basics of how a well-formed API catalog has to look like. I tried to generate one by myself covering the Prado PHP framework classes, but failed. The file was imported and recognized in CodeIntel preferences, but no proper completion appears, only the PHP functions from inside the stdlibs folder are available.

For me the best possible code completion (mainly for, but not limited to, PHP) is the heaviest factor of influence for any purchase decision. At the moment I'm staying with Zend Studio since I paid for a three years license—and it has a well-working PHP completion engine. But Komodo forces my eyebrows to raise ...

trentm | Mon, 2007-02-19 14:23

I've just uploaded the codeintel CIX schema. I'll try to add some intro docs to writing good CIX files in the next couple of weeks.

mjwilson | Mon, 2007-02-26 06:05

I couldn't get either of the attachments on the page linked above; I just get "Page not found".

trentm | Mon, 2007-02-26 10:50

Sorry about the download problem. Looking into it.

jeffg | Tue, 2007-02-27 11:10

After some wrangling, the problem has been addressed and the files are now available for download. Sorry for the delay on getting this fixed.

--
JeffG | Komodo IDE 4.0 | MacBook Pro OS X Intel / Ubuntu 6.10 i386

cheesegrits | Fri, 2007-10-26 15:43

Did anyone ever have any luck creating a Mootools API catalog?

With Joomla switching from Prototype/Scriptaculous to Mootools, I'm now on the prowl looking for such a beast ...

-- hugh

ToddW | Fri, 2007-10-26 16:24

I wouldn't mind taking a punt at this once I get some time...

Todd.

corelist | Mon, 2008-06-02 04:11

I am using mootools too, and it is nice to have it supported built-in!

-->