Delphi Class Explorer Window
Go Up to View Menu
Go Up to Delphi Class Explorer Topics
View > Class Explorer
The Delphi Class Explorer makes it easy to navigate through unit files in your projects viewing hierarchical structure of declared types, classes, interfaces, and namespaces and automates the creation of members (fields, methods, properties).
The Delphi Class Explorer window has three panes:
- The Search control occupies the upper line of the Delphi Class Explorer window.
- The Class View pane, it occupies the central part of the Delphi Class Explorer window.
- The Member List pane.
Contents
The Search control
The Search control occupies the upper line of the Delphi Class Explorer window. It contains the lens icon.
The Search control provides quick location of entities in the Class View pane. Type a string and all entities in the Class View pane that names match this string become highlighted. The first matched entity becomes selected.
The Class View pane
The Class View can show all types, classes, interfaces, and namespaces declared in units that are directly used in your projects. Depending on the selected mode, the Class View can display three different kinds of trees:
- Derived to Base -- In this mode, the Class View displays trees containing all types, classes, interfaces, and global scopes (for each unit) declared in units directly used in your projects. Tree branches grow from base classes and interfaces to derived classes.
- Base to Derived -- In this mode, the Class View displays trees containing all types, classes, interfaces, and global scopes (for each unit) declared in units directly used in your projects. Tree branches grow from derived classes and interfaces to base classes.
- Container -- In this mode, the Class View's trees additionally display all containers (units and namespaces) directly used in your projects. Tree root nodes correspond to units used in your project and derived nodes correspond to types, classes, interfaces, and global scopes (for each unit) declared in these units.
The Class View uses the alphabetical order to display nodes (units, classes, interfaces, types) in the tree.
Clicking tree nodes, you can expand or collapse nodes. The icon is displayed before collapsed nodes and the icon is displayed before expanded nodes. If no icon is displayed before a node, then this node is a terminal node (that is, it does not have subnodes).
Double-clicking a node (or pressing ENTER) loads the corresponding source file into the text editor and position the text editor viewport on the declaration of the selected item.
The Class View displays the following icons indicating different types of nodes:
Icon | Description |
---|---|
Collapsed node | |
Expanded node | |
Namespace | |
Class | |
Interface | |
Record |
Member List pane
The Member List pane occupies the lower section of the Delphi Class Explorer window. When you select one of the nodes in the Class View pane, the Member List displays the list of all members declared in this entity. Members are such language items as fields, properties, and methods. They can be declared in classes, interfaces, or in global scopes in your project units.
The Member List displays members in that order in which they are declared in units.
Double-clicking a member (or pressing ENTER) loads the corresponding source file into the text editor and positions the text editor viewport on the declaration of the selected member.
SHIFT+double-clicking a member (or pressing SHIFT+ENTER) loads the corresponding source file into the text editor and positions the text editor viewport on the definition (implementation) of the selected method.
The Member List displays the following icons indicating different types of members (or globally declared items):
Icon | Description |
---|---|
Field | |
Method | |
Property |
Next to these icons, the Member List can display icons specifying visibility of members:
Icon | Description |
---|---|
Published item | |
Protected item | |
Strict protected item | |
Strict private item |
Members that do not have visibility icons are declared public, private or global.
The Delphi Class Explorer Context Menu
Right-clicking in the Delphi Class Explorer window activates the context menu containing the following commands:
Item | Description |
---|---|
Add Field |
Invokes the Add Field dialog box. |
Add Property |
Invokes the Add Property dialog box. |
Add Method |
Invokes the Add Method dialog box. |
Delete |
Deletes the selected node. |
Go to Declaration |
Loads the corresponding source file into the text editor and positions the text editor's viewport on the declaration of the selected class, field, property, or method. Enabled when the selected item is a class, field, property, or method. |
Go to Definition |
Loads the corresponding source file into the text editor and positions the text editor's viewport on the implementation of the selected method. Enabled when the selected item is a method. |
Go to Getter Definition |
Loads the corresponding source file into the text editor and positions the text editor's viewport on the getter definition. Enabled when the selected item is a property. |
Go to Setter Definition |
Loads the corresponding source file into the text editor and positions the text editor viewport on the setter definition. Enabled when the selected item is a property. |
Search for Usages |
Opens the Search for Usages dialog box to find usages of classes, methods, variables, and overriding methods, derived classes and implemented interfaces in Delphi source code projects. |
See Also
Related Procedures
- Viewing Hierarchy of Classes, Interfaces, and Types in the Class Explorer
- Activating Different Modes of Viewing the Inheritance Hierarchy in the Class Explorer
- Viewing Members Declared in Classes and Interfaces with the Class Explorer
- Locating Declarations of Classes, Interfaces, and Types with the Class Explorer
- Locating Declarations of Members with the Class Explorer
- Locating Definitions of Methods with the Class Explorer
- Locating Definitions of Properties' Access Specifiers with the Class Explorer
- Automating the Creation of Fields with the Class Explorer
- Automating the Creation of Methods with the Class Explorer
- Automating the Creation of Properties with the Class Explorer
- Creating a Method - Example