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

Table of Contents

1. Introduction
1.1 Overview
2. Requirements
2.1 Feature Parity with JDT
2.2 Show Multiple Inheritance
2.3 Filtering Options
2.4 Update on Modification
2.5 Eclipse/JDT Reuse
2.6 Performance/Scalability


1. Introduction

This document serves as a starting point for understanding the requirements and design for a hierarchy view within the CDT. 

1.1 Overview

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.

image

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.

image



2. Requirements

This section outlines some of the architectural and functional requirements for the CDT Hierarchy View.

2.1 Feature Parity with JDT

The CDT Hierarchy View should be functionally equivalent to the JDT Type Hierarchy View.  This means we need a view which can:

  1. Show the derived class (subtype) hierarchy.
  2. image

  3. Show the base class (supertype) hierarchy.
  4. image

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).

2.2 Show Multiple Inheritance

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:

image

2.3 Filtering Options

The Hierarchy View should have filtering options:

2.4 Update on Modification

Whenever a resource modification is made, the Hierarchy View should be updated to reflect the change.

2.5 Eclipse/JDT Reuse

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.

2.6 Performance/Scalability

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.