Open ssigwart opened 5 years ago
@ssigwart, can you use Prefs > Languages > PHP > PHP Directories?
I think I'd run into problems there. The directories are already included and scanned, it's just that filename_jump_handler
doesn't know the exact location of the files. I didn't test it, but I'm pretty sure it doesn't look at that setting to find the file.
but I'm pretty sure it doesn't look at that setting to find the file.
yeah exactly. I was thinking change filename_jump_handler
to use it but it seems so specific to have a pref that says "I'll have files here, and here, and here and here". I wonder if this could hook into the Commando Files scope. @Naatan, I just had a look at the Files scope code to see if it could be used here but the search code that takes a onComplete
function doesn't receive anything from the search.
Is there a way that code that's not part of that scope to use the cached structure to quickly find a file in the project?
Short Summary
The following code only works for relative include paths or absolute paths. https://github.com/Komodo/KomodoEdit/blob/3a6fd631da21003af89b9f9bb855d936c753411c/src/chrome/komodo/content/hyperlinks/filehandler.js#L220-L223
Steps to Reproduce
Set up a PHP project with
www
andincludes
top level folders. Addwww/index.php
which includesrequire_once('MyClass.class.php');
. Addincludes/MyClass.class.php
. Inwww/index.php
, click the hyperlink toMyClass.class.php
.ExpectedDesired resultsincludes/MyClass.class.php
should open.Actual results
Error message that file can't be found.
Platform Information
Doesn't matter.
Additional Information
Ideally, it would know the PHP include paths, but that's impractical since
set_include_path
can be used anywhere in the PHP code. @cgchoffman or @Naatan, do you have any objections to me adding a Project level preference to add a list of include paths? Then I can updatefilehandler.js
to usealternativePaths
offilename_jump_handler
.