Primary Links:


Drupal.cix replacement cix files

Posted by jeffg on 2007-03-01 17:25
OS: All / Any

I've attached replacement php-<version>.cix files for Drupal 4.7 and 5.1, which should provide autocomplete for all functions in Drupal. Using these files is slightly tricky:

  1. shut down Komodo
  2. download and unzip the archive for your version of Drupal.
  3. copy the .cix file for your version of php ( or all of them, why not ) into the Komodo installation directory, overwriting the existing php-<version>.cix files[1]
  4. re-start Komodo and open a php file. you should see the standard libs getting updated in the status bar. Once this is done, you should see autocomplete and calltips for any function in Drupal[2]

[1] These files are located in different spots for each platform:

Windows: C:\Program Files\ActiveState Komodo IDE 4.0\lib\mozilla\python\komodo\codeintel2\stdlibs

Linux: /home/username/Komodo-IDE-4.0/lib/mozilla/python/komodo/codeintel2/stdlibs

OS X: /Applications/Komodo\ IDE.app/Contents/MacOS/python/komodo/codeintel2/stdlibs

As well, you might need to use sudo on OS X and Linux depending on the file permissions of the Komodo install directory.

[2] I have not done exhaustive testing of this, so some things might be missing.

Update: I've attached new versions of these files that include cck, og and views ( and a few others ) as well as a fix for overly long comment strings.

Update:I've removed these files as they are no longer necessary. Komodo 4.0.3 and above ( including Komodo Edit ) now allow for recursive scanning of php code on the current project as well as any directories added in preferences either globally or in the current project preferences.

PS
jeffg | Thu, 2007-03-01 17:37

If anyone wants to suggest a set of common contrib modules to include, let me know eg cck, views, etc.

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

weitzman | Fri, 2007-03-02 07:53

i will give this a try. i have been frustrated enough by lack of this that avoided komodo for a while. let me try again.

some contribs:
cck
views
og
devel

weitzman | Fri, 2007-03-02 22:41

worked. nice one. finally!

the call tips don't truncate the full comments about a function but thats a minor nit. see drupal_add_css(), for example.

jeffg | Fri, 2007-03-02 11:01

Let me know what you think. I'm going to post some more files with a bunch of contrib modules included later today. Just be be clear though, these files are a bit of a hack, and are *not* how we intend to solve this problem long-term. Komodo 4.1 will have a better solution for any PHP project like Drupal that uses an auto-loading mechanism.

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

jeffg | Mon, 2007-03-05 12:48

The new files should fix the long comment string issue, and include cck / view / devel / etc.

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

hcgtv | Mon, 2007-03-05 14:12

Jeff,

How would one go about creating specialized code intelligence files for other projects? I happen to work with Textpattern, PunBB and a few other Open Source projects and after looking over the Drupal files you created, I can see a big productivity gain.

Also, I guess if you create specialized PHP files with tacked on lines for a particular project, then you'd have to keep switching them in and out if you jump from one project to the other?

Thanks.

Bert Garcia ~ hcgtv ~ PHPXref ~ TxPun

jeffg | Mon, 2007-03-05 15:20

This is possible, but you are right it would be a lot of work. There might be a win for combining all the projects and creating a big file with all their data, but you might also have problems with two different projects both having different implementations of thew same function name, eg 'db_query'.Otherwise you would have to switch the core library cix files when switching codebases.

I cannot stress enough that this is a lame, hacky solution that happens to work for me because I write Drupal code all the time. We are going to solve this problem for everyone in a much better way in Komodo 4.1.

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

hcgtv | Mon, 2007-03-05 15:38

Then I'll wait and see what 4.1 has to offer.

Didn't know you worked on the Drupal project, makes me feel bad for dissing the forum, it won't happen again.

On a side note, Komodo IDE 4.0.2 is working great on Debian Etch.

Bert Garcia ~ hcgtv ~ PHPXref ~ TxPun

jeffg | Tue, 2007-03-06 08:33

I posted cix files generated from Wordpress, Textpattern and punbb here:

http://support.activestate.com/forum-topic/cix-files-for-more-php-we

If you are really sure there aren't any function names in common between textpattern and punbb, I have automated the creation of these files to the point where generating a 'combined' file would be easy.

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

hcgtv | Tue, 2007-03-06 09:59

Jeff,

I'll have to make sure and see if Textpattern and PunBB can be combined, I'll let you know.

Thanks again.

Bert Garcia ~ hcgtv ~ PHPXref ~ TxPun