The Code Editor
Use the Code Editor to create and edit source code files.
Different file types that you open in the editor will support different editing features. For example, if you open a DataFlex source file, the Code Editor will provide color syntax highlighting specific to DataFlex language syntax. For more information, see File Types.
Opening a File in the Code Editor
Files can be opened in the Code Editor in the following ways:
- Activate the Open File dialog via the toolbar or Open File(s) option on the File menu.
- Activate the Create New dialog via the toolbar or New option on the File menu.
- Drag and drop a file from Windows Explorer.
- Double-click a file in Workspace Explorer.
Editing Features
The Code Editor supports a wide range of editing features such as:
- CodeSense: CodeSense is a set of Studio features that intelligently assist you in writing code, providing lists of context-sensitive options and information.
- Color Syntax Highlighting: Language-specific keywords, comments, and strings are colored differently to set them apart from plain text.
- Drag and Drop Text Manipulation: Highlighted text can be dragged and dropped between any window supporting OLE text Drag and Drop. Text may be copied or moved.
- Highlighting of Block-Starting and Ending Commands: If you place the cursor on a block-starting command, such as
begin, the matching block-ending command, such asend, will be highlighted. You can also easily navigate between a block-starting and ending command by pressingCtrl + ]on the keyboard when such a command is highlighted. - Matching Parentheses Highlighting: When the caret is positioned immediately after a beginning or ending parenthesis (
(or)), the matching ending or beginning parenthesis ()or(, respectively) is highlighted. The same works for beginning and ending square ([]) and curly ({}) brackets. - Multiple Split Views: You can create up to four separate views of the same edit buffer. Each view can be scrolled independently. You can achieve this using the Code Splitter:

There is a horizontal and a vertical splitter handle, so you can split the editor window horizontally and vertically.
- Unlimited Undo/Redo: All edit actions are fully undoable and redoable.
- Column Selection and Manipulation: Columns of text can be selected with the mouse (alt+drag) and then manipulated. Empty columns (columns with a width of zero characters) can be selected, causing subsequent typing and deletion to occur over multiple lines at the same time.
- Automatic Indenting and Outdenting: DataFlex block-starting commands, such as
Begin, will automatically indent the following line. Commands, such asEnd, will automatically un-indent theEnd, thereby retaining correct indentation for the language. - Search & Search/Replace: Powerful search and replace functionality is provided, including features such as bookmarking all occurrences of a find and replacements respecting the case of the replaced word.
- Bookmarking: Up to ten bookmarks are supported. Bookmarks permit a position in the source to be marked and returned to later with a simple key combination.
- Toggle Whitespace: Toggle the display of "whitespace" (show spaces, etc.).
- Toggle Case: Uppercase/lowercase the marked block.
- Comment/Uncomment: Comment/Uncomment the marked block.
- Code Complete: Automatic Code Completion.
- Context Help: Relative to the caret.
- Hyper-Links: When editing a DataFlex source file, you can place hyper-links inside comments (i.e., following a
//comment marker). This can be useful to link sections of code with external documentation.
Accessing the Editor Features
While you are editing text, the Studio's Edit and Text menus are active. These menus list most of the editing features available in the Code Editor.