Code Explorer displays an overview of the current source. A treeview displays a composition of all the major source elements in that file.
Use the Code Explorer to:
The Code Explorer treeview displays the composition of the file currently being edited in the Code Editor or the Visual Designer. Each tree item represents some element of code in the file. Different types of code element are represented by different icons in the tree.
Below is a list of the different element types and their icons:
- Class declaration
- Method declaration (i.e. Procedure or Function)
- Property declaration
- Object declaration
- Use statement
- Constant declaration (Define or #Replace)
- Struct declaration
- ActiveX resource
- Entry_Item statement
- External_Function declaration
- To Do Items
- Web Property
- Published Web Method
- Entry_Item list (used in legacy list and grid classes)
- Legacy Menu command (i.e. DFCreate_Menu)
Code elements such as objects or classes that may contain other code elements are represented in the treeview using nested tree items. Expand a tree item to display the list of nested code elements.
You can filter which code element types will be displayed in the Configure Studio dialog. You can activate the Configure Studio dialog by selecting Configure Studio from the Tools menu or by selecting Configure Code Explorer from the Code Explorer's context menu.
Code Explorer can be used to coordinate other Studio views to the current file. Below are some common uses of the Code Explorer for code navigation and selection:
Code Explorer can be used to change the order of objects declared in a source file.
To move an object select it in the Code Explorer then press Alt+Up Arrow or Alt+Down Arrow to move the object up or down relative to its sibling objects. The object declaration and all of its nested content will be moved above or below the relevant sibling object.
Code Explorer only supports moving an object relative to sibling objects of the same parent object, or root objects relative to each other.
You may also use the Move Object Up or Move Object Down context menu items to move an object.
Code Explorer supports managing the Web Property interface of your web application’s web objects.
Property declarations inside a cWebObject subclass declaration or object declaration can be defined as Web Properties. Web properties are represented in the treeview with the following icon.
- Web Property
You may change whether a property declaration is a Web Property or not by selecting it in the treeview and clicking the Web Property button on the toolbar or selecting the Web Property option in the context menu.
Code Explorer supports managing the published interface of your Web Services Objects or Web Browser Objects.
Methods belonging to a Web Service Object (WSO) or Web Browser Object (WBO) that are published are represented in the treeview with the following icon:
- Published Web Method
You may change the published state of a WSO or WBO method by selecting it in the treeview then choosing Publish from the context menu (this toggles the method's published state).
The Code Explorer's toolbar supports the following options:
If an object declaration is selected, then this option will attempt to move the declaration above the previous sibling object declaration.
If an object declaration is selected, then this option will attempt to move the declaration below the next sibling object declaration.
If a property declaration belongs to a cWebObject subclass or web object declaration then this option toggles whether the property is a Web Property or not.
If a method declaration element belonging to a Web Service Object or a Web Browser Object is selected then this option toggles the method's published state.
Code Explorer Context Menu