RAD Studio (Common)
ContentsIndex
PreviousUpNext
Editing Code Procedures

This section provides how-to information on using the features of the Code Editor.

Name 
Description 
Code folding lets you collapse (hide) and expand (show) your code to make it easier to navigate and read. RAD Studio generates code that contains code folding regions, but you can add your own regions as needed. 
While using the Code Editor, you can add your favorite code constructs to the Template Manager to create a library of the templates you use most often. 
Template libraries are custom project templates that specify how a project should look and what it should contain. When you create a custom template library, it is placed in the New Files dialog box where is accessible for creating a project using FileNew.
You can create template library projects from scratch, or you can use projects previously created by you or other developers as the basis for template libraries. To use an existing project, you simply create an XML file with the extension .bdstemplatelib which describes the project and is used to create the template library using that... more 
CodeGear RAD Studio lets you customize your Code Editor by using the available settings to modify keystroke mappings, fonts, margin widths, colors, syntax highlighting, and indentation styles. 
The Find References refactoring feature helps you locate any connections between a file containing a symbol you intend to rename and other files where that symbol also appears. A preview allows you to decide how you want the refactoring to operate on specific targets or on the group of references as a whole. 
Depending on which language you are using, you can use a refactoring feature to locate namespaces or units. If you are using C#, you can use the Use Namespace command to import namespaces into your code files, based on an object in your code. If you are using Delphi, you can use the Find Unit command to locate and add units to your code file based on objects in your code.
The Use Namespace dialog appears when you select a C# object name and select the Use Namespace command. The import operation attempts to identify and display the most likely... more 
You can record a series of keystrokes as a macro while editing code. After you record a macro, you can play it back to repeat the keystrokes during the current IDE session. 
Refactoring refers to the capability to make structural changes to your code without changing the functionality of the code. Code can often be made more compact, more readable, and more efficient through selective refactoring operations. RAD Studio provides a set of refactoring operations that can help you re-architect your code in the most effective and efficient manner possible.
Refactoring operations are available for Delphi, C#, and C++. However, the refactorings for C# and C++ are limited in number. You can access the refactoring commands from the Refactoring menu or from a right-click context menu while in the Code Editor.... more 
You can mark a location in your code with a bookmark and jump directly to it from anywhere in the file. You can set up to ten bookmarks. Bookmarks are preserved when you save the file and available when you reopen the file in the Code Editor
Class completion automates the definition of new classes by generating skeleton code for Delphi class members that you declare. 
Code Insight (sometimes referred to as Code Completion) is a set of features in the Code Editor and the HTML Tag Editor that provide code completion, display code parameter lists, and show tool tips for expressions and symbols.
The hint window list box filters out all interface method declarations that are referred to by property read or write clauses. The list box displays only properties and stand-alone methods declared in the interface type. 
Live templates are reusable code statements that are accessible from the Code Editor. You can insert pre-defined code segments into your code or add your own code snippets to the Template window.
Note: If a template has one or more jump points that are editable, it will automatically enter SyncEdit mode when you are inserting it into your code. The jump points allow you to navigate between different areas of the template, using the Tab
key and SHIFT+Tab keys. Pressing ESC, Enter,(or pressing theTab key) from the last jump point exits SyncEdit mode and puts the... more 
The History Manager lets you view and compare versions of a file, including multiple backup versions, saved local changes, and the edit buffer of unsaved changes.
For simplicity, the following procedures uses a small text file to introduce the functionality of the History Manager. However, the History Manager is available for most files, including source code and HTML files. 
The Sync Edit feature lets you simultaneously edit indentical identifiers in selected code. For example, in a procedure that contains three occurrences of label1, you can edit just the first occurrence and all the other occurrences will change automatically. 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!