CDT Hierarchy View Feature Spec This document serves as the current "Record of Understanding" for the requirements of the Hierarchy View for the Eclipse CDT. |
![]() |
Author | : Chris Wiebe |
Revision Date | : 01/29/2004 - Version: 0.1.0 |
Change History | : 0.2 - Draft |
This document serves as a starting point for understanding the requirements and design for a hierarchy view within the CDT.
A class viewer is a convenient feature found in many development environments. It assists the developer in visualizing and navigating the inheritance hierarchy for a given class. Classes can be viewed as a tree of base classes (supertypes) or derived classes (subtypes).
The Type Hierarchy View in the Eclipse JDT provides an easy way to see the inheritance tree for a java class.
For the CDT, we would like to have a similar feature for viewing C++ class hierarchies. Of course, the C++ and java languages have their own unique ways of dealing with classes and inheritance, so our requirements for a CDT Hierarchy View will be slightly different.
This section outlines some of the architectural and functional requirements for the CDT Hierarchy View.
The CDT Hierarchy View should be functionally equivalent to the JDT Type Hierarchy View. This means we need a view which can:
Note: In addition to 1 and 2 above, the JDT Type Hierarchy View also has the ability to show the complete type hierarchy (all supertypes and all subtypes) for a Java class. It's not feasible to implement this for the CDT, however, since C++ allows multiple inheritance (see 2.2 below).
Unlike java, in C++ it's possible to define a class which inherits directly from several classes at once. We need to be able to show this when examining base classes (supertypes) in the hierarchy view:
The Hierarchy View should have filtering options:
Whenever a resource modification is made, the Hierarchy View should be updated to reflect the change.
Although the C model differs substantially from the java model, the gui presentation of the class hierarchy view is very similar. We should strive to reuse the existing JDT type hierarchy code (dialogs, views, actions, etc.) where possible.
For a developer to be productive, the Hierarchy View needs to remain quick and responsive, even when navigating thousands of classes. The UI responsiveness will depend largely on the speed of the search engine (which internally relies on the indexer), as well as any potential caching strategies in the Hierarchy View.