2

File A includes files B and C.

C thus has access to all the stuff defined in A and B, but C doesn't know that. How can I tell C that it actually has access so that IntelliSense works?


Perhaps a more clear example:

If master.php includes library.php and page.php then page.php has access to library.php, but there's no way for page.php to know that. I want to manually tell page.php that library.php is already included, and have Komodo save this in some meta data or project file.

mpen
  • 272,448
  • 266
  • 850
  • 1,236

1 Answers1

1

The basic answer is that, depending on your Komodo settings, it will automatically gather it (though in my experience it's not 100% reliable). You can set which directories to automatically import for intellisense in the IDE settings. Two places I would check:

Go to Edit->Preferences->Code Intelligence in Komodo IDE and make sure 'Include all files and directories from the project base directory'

Go to Edit->Preferences->Languages->PHP and add any other directories to the import like Zend Framework, for instance.

ashurexm
  • 6,209
  • 3
  • 45
  • 69
  • Was hoping to do it on a per-file basis. – mpen Jul 16 '11 at 05:46
  • You were hoping that if you opened 'child.php' it loaded the code from the files that were included or required in the php file? I'm pretty sure that this functionality doesn't exist. However, if you create a project that encompasses all the files it will work. – ashurexm Jul 18 '11 at 02:54
  • If `master.php` includes `library.php` and `page.php` then `page.php` has access to `library.php`, but there's no way for `page.php` to know that. I want to manually tell `page.php` that `library.php` is already included, and have Komodo save this in some meta data or project file. – mpen Jul 18 '11 at 03:00
  • 1
    If you create a project and all those files exist in the project structure (they don't necessarily have to be in the same directory, but all must be under the project root), then Komodo will be able to IntelliSense the included files if you've got your preferences set up like I answered. However, this works better for OO code than functional code, and I have noticed a lot of 'sometimes it works, and sometimes it doesn't' in the same editing session- so it's certainly not perfect. – ashurexm Jul 18 '11 at 03:11
  • Well yeah, that's the problem...it does seem to spotty. Oh well, if this is the best we can do, I'll take it. Thanks! – mpen Jul 18 '11 at 15:34