<h1>The ClassBrowser plugin</h1>
Written by Shlomy Reinstein, January 2007.
<h2>Table of Contents</h2>
The ClassBrowser plugin provides a dockable window presenting the hierarchy of a selected class, along with its members (including inherited members, if requested). You can jump to each element (class/member) in the hierarchy by double-clicking it. The hierarchy is generated using information provided by the Ctags tool.
The dockable window of ClassBrowser contains a split pane, presenting the class hierarchy in the upper part and the members of the currently-selected class (within the hierarchy) in the lower part. Double-clicking a member or a class jumps to the definition of that class or member.
<h3>The class hierarchy pane</h3>
The class hierarchy is presented as a tree. Three separate hierarchies can be displayed:
<li>The complete class hierarchy: Presents all the base (super) classes as well as all the derived (sub) classes, and is available only when the hierarchy has a single root, i.e. there is no multiple inheritance from the selected class towards the root.
<li>The base (super) class hierarchy: Presents all the classes from which the selected class is derived. Here, the selected class is at the root of the tree, and each class node has its direct base classes as children.
<li>The derived (sub) class hierarchy: Presents all the classes that are derived from the selected class. The selected class is at the root of the tree, and each class node has its direct descendants as children.
You can toggle between the hierarchies using buttons above the hierarchy. When the complete class hierarchy is not available, the button to select it is hidden.
<h3>The class members pane</h3>
The members of the class that is currently selected in the hierarchy pane are displayed in the lower part of the split pane (the members pane). Two views are available:
<li>Self members: Lists all the members defined in the selected class.
<li>Inherited: Lists all the members defined in the selected class, as well as the members inherited from its base (super) classses. In this view, the name of the defining class is appended to each member, so you know where each member comes from.
You can toggle between the views using buttons above the members pane. In addition, the members pane contains buttons for hiding members having specific attributes:
<li> <b>F</b>: Hides fields (data members)
<li> <b>S</b>: Hides static members (both data and function members)
<li> <b>NP</b>: Hides non-public members (both data and function members)
ClassBrowser uses the CtagsInterface plugin to provide it with the tag information. It also uses CtagsInterface to jump to selected tags (classes/members). Hence, you must have CtagsInterface installed and configured properly.
To make the best use of ClassBrowser, configure the CtagsInterface plugin to provide the following options to Ctags: <code>--fields=+anzKiS</code> <br>
These options tell Ctags to generate inheritance information, function/method signatures, access of class members (public/private/...), and provide complete names for tag kinds.
To use ClassBrowser, do one of the following:
<li> Select the name of a class in a jEdit buffer, and invoke "Plugins -> Class Browser -> Show Class Hierarchy"
<li> Invoke "Plugins -> Class Browser -> Show Class Hierarchy .." and enter the name of the class in the input dialog that opens.
Generating the hierarchy may take a while, depending on the sizes of the hierarchy and the tag database. Wait patiently, and you will get the hierarchy in a "Class Hierarchy Browser" dockable.
<li> The support for classes within a scope (e.g. classes under a namespace in C++, inner classes in Java) is quite limited in this version. Due to the information generated by Ctags, such classes can never be accurately supported, but future versions of the plugin will attempt to better handle scoped classes. For now, if you want to see the upper part of the hierarchy of a scoped class (i.e. the tree of 'super' or 'base' classes, search for the plain class name (i.e. without the namespace/outer class name). If you want to see the lower part of the hierarchy (i.e. the 'sub' or 'derived' classes), use the qualified class name.
Any feedback would be most welcome. Please send your feedback to the jedit-users or jedit-devel mailing list.