File Exchange

image thumbnail

Class Inheritance Browser

version 1.8 (21.1 KB) by

A tool for managing and organizing classes, with a simple interface and (optional) tree diagram.

3.66667
3 Ratings

2 Downloads

Updated

View License

This tool searches a given directory and populates a browser window with pertinent information about each discovered class, including properties, methods, and superclasses. Other useful features include opening a class definition file from the browser window, opening a file to the line where a certain method is defined, and printing property help to the console.

Additionally, if the Bioinformatics Toolbox is installed, a tree diagram will be displayed that visualizes inheritance relationships between all Matlab classes found.

Originally written as a project for Engineering 177, Advanced Matlab Programming, Spring 2010, Professor Andrew Packard, University of California, Berkeley.

Comments and Ratings (8)

Andreas

Andreas (view profile)

up to date versions of this toolbox can be found on github:

https://github.com/kotowicz/matlab-ClassInheritanceBrowser

Please submit your problems to github too, since I don't check fileexchange too often.

Sander Aerts

It could be a nice utility but it doesn't work on my computer (I run R2011b). I receive the following error:

unkown error:
The specified super-class 'cooler' contains a parse error or cannot be found on MATLAB's search path, possibly shadowed by another file with the same name.
Class Inheritance Analyzer/Browser

I happen to know that 'cooler' is a package directory and not a super class. Following the program flow I ended up in the iTree class where some invalid meta.class instance caused an error.

I hope you can fix it, the screenshots do look promissing.

Jitka

Jitka (view profile)

Thank you for this utility, but for me, iz doesn't work. As I try the example, I get a message "Error: Class not found. Please check if class name is correct or try again using full path to class.", but everything should be ok: h = classInheritance.browse('+inex');. When I tried to use the full path, the message was the same.

Brad Stiritz

Very helpful utility! Highly recommended! I launch this browser from a Matlab toolbar button.
Just a couple of minor notes :
(1) I commented-out browse.m lines 24-31 to suppress annoying error messages about bioinfo toolbox; maybe please wrap those in a conditional, if possible?
(2) Long identifier strings can easily get cut off & scrolling within the columns is no fun. Maybe please consider resizing window contents when window is resized?
Otherwise, great work! Thank you very much for this submission :)

Kenneth

Rather than use "ver('bioinfo')" I'd suggest using:
license('checkout', 'Bioinformatics Toolbox'). This is a special condition for those of us using network licenses. We may have the toolbox installed, but we can't get to a license.

Andreas

Andreas (view profile)

the latest version (Updated 12 Aug 2010) should also work without the Bioinformatics Toolbox (but won't show the tree diagram). Please post if you get any errors though.

Riccardo

Hi,

This sounds very useful.

Is there a way for it to work without the bioinformatic toolbox which I don't have?

Andreas

Andreas (view profile)

Updates

1.8

License checking made compatible with network licenses.

1.7

Summary, description, and requirements updated.

1.6

Checks to see if the bioinformatics toolbox is present. If not, then the browser window is opened without displaying the tree diagram.

1.5

- clean up code
- try harder to find user supplied class name
- catch classInheritance.iTree errors in classInheritance.browse
- made package +inex out of inheritanceexample directory.

1.3

- Numerous bugs fixed, speed improved
- 'Browse' button to jump to a new directory
- Right click on method -> opens the proper file to the proper line
- Right click on property -> prints property help to console

1.1

- Use the 'Browse' button to jump to a new directory
- Right click on method -> open the proper file to the proper line
- Right click on property -> print property help to the console

MATLAB Release
MATLAB 7.9 (R2009b)
Acknowledgements

Inspired by: View Class Inheritance Hierarchy

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video