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.
- Activating the Create New dialog via
the toolbar or New option on the File menu.
- Dragging and dropping a file from Windows Explorer.
- Double-clicking a file in Workspace
Explorer.
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 as
end, will be highlighted. You can also easily navigate between a block-starting
and ending command by pressing Ctrl + ] 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 as End, will automatically
un-indent the "End" 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/UnComments
the marked block.
- Code Complete. Automatic
Code Completion.
- Context-Help relative to
the caret.
- Hyperlinks. When editing
a DataFlex source file, you can place hyperlinks 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.
See Also
CodeSense
Code Editor Mouse Actions
Code Editor Keyboard Mapping
Code Editor Context Menu
Finding and Replacing Text
Searching for Text in Multiple Files
Macro Recording
Configure Editor