RAD Studio (Common)
ContentsIndex
PreviousUpNext
Delphi Class Explorer Window

ViewDelphi Class Explorer 

The 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 (the main window of the Class Explorer) is separated onto two panes:

  • The Class View pane, it occupies the upper part of the Delphi Class Explorer window.
  • The Member List pane.
The Class View shows a tree structure of types, classes, interfaces, and namespaces declared directly in your project. 

The Member List displays local and global members (fields, properties, and methods) declared in a node (class/interface) selected in the Class View

The Class Explorer parses all unit files registered in a project when the project is opened and parses each single unit file when it is saved. The Class Explorer uses the obtained information to order nodes (units, classes, interfaces, types) in the Class View tree and to order members (fields, properties, and methods) displayed in the Member List.

The Class View can show all types, classes, interfaces, and namespaces declared in units 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/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/interfaces to base classes.
  • Container - In this mode, the Class View's trees additionally display all containers (units/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 Plus icon icon is displayed before collapsed nodes and the Minus icon 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 
Plus icon  
Collapsed node  
Minus icon  
Expanded node  
Namespace icon  
Namespace  
Class icon  
Class  
Interface icon  
Interface  
Record icon  
Record  

The Member List pane occupies the bottom of the Delphi Class Explorer window. When you select one of the nodes in the Class View pane, then 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 icon  
Field  
Method icon  
Method  
Property icon  
Property  

Next to these icons the Member List can display icons specifying visibility of members:

Icon 
Description 
Published item icon  
Published item  
Protected item icon  
Protected item  
Strict protected item icon  
Strict protected item  
Strict private item icon  
Strict private item  

Members that do not have visibility icons are declared public, private or globally.

Right-click 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.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!