In my opinion MATLAB is rather lacking when it comes to modern software development. One of the things which always pissed me off is the absence of proper code hierarchy browser. Sure – there is current directory window but it displays everything, not only source code files and doesn’t provide any visual clues regarding logical organisation of the files. Fortunately class directories always start with @ and packages with + so you can figure it out eventually but it’s far from perfect. To work around these issues, I’ve created my own source code hierarchy browser using the “undocumented” uitree() function. It supports custom icons for package/class directories and for m/mat files. One can use it either in separate window or docked and in one- or two-panel mode. Double-clicking a file either opens it in the editor (M files) or loads its content to the workspace (MAT files). I found it very helpful so far, especially when working with several different locations on the filesystem at the same time – the ability to open many instances of this utility is quite useful.
That’s it I guess. Source code is BSD licensed as usual. In case you’re using one of the older MATLAB releases you will have to remove the ‘v0’ parameter from calls to uitree() and uitreenode(). Enjoy!
DOWNLOAD: explore_matlab_path.zip
Pretty neat !
However, I’m having problems getting it to work in docking mode. When I click (on the new explore figure) on “Desktop->Dock Figure 1: Explore MATLAB Path”, it goes into “docking mode” just fine (I assume this is how you dock a “custom” figure?).
But I no longer am able to see any content. In fact, it just displays what used to be at that location inside the Matlab UI, as if it didn’t update/redraw after being docked.
If it helps, I get a “Warning: Possible deprecated use of set on a Java object with an HG Property ‘ActionPerformedCallback’. > In explore_matlab_path at 55”, but that appears when launching it. No messages/warnings when docking it.
Thanks,
Fritz
Right, Matlab 7.12.0 (2011a), Ubuntu 14.04 x64