January 14, 2008
Whenever your project reaches a certain level of complexity, navigating the code can be a very time consuming task. For instance, you may using a function in one file, but it's actually declared in another file. This makes sense with PHP, because include files makes it easy to re-use your functions and classes in many files. But what do you do when you need to have a look at how this MagicStuffWillHappenWhenYouCallMe() function actually works? Remembering where it's declared, opening the file and searching for the function is painfully slow, and if your project is just a tad bit more complicated than 3 files using the same functions.php, you will soon be using more time navigating your code than writing it!
TSW phpCoder 2008 comes with two functions that should help you a lot when navigating code. "Navigate to" and "Find all references to". They are both based on the same parsing engine that brings you PHP IntelliSense, giving them the huge advantage of actually being context-sensitive. For instance, you may have two functions with the same name, but one of them belongs to a class - if you make a reference search for the class member, the stand-alone function won't show up in the results, because phpCoder knows the difference from looking at the parsed documents.
This functionality really took a long time to implement, with lots of little details needing attention, but I hope that you will think it was worth the extra wait, once you see the video of it in action :). Please remember that while the example code/files used in the video are very simple, this works just as well on big projects with many files!
Please let me know what you think of it. I really appreciate your feedback :)