Code Editor Context Menu
The Code Editor provides a context menu offering shortcuts to frequently used operations:
Go To Definition
Opens the file where the selected method, class, variable, property, etc. is defined and positions the cursor at the beginning of the definition.
If the selected symbol is defined in more than one location, then the Select Target dialog is activated. This dialog can be used to select the desired target from the list of all locations for that definition.
The current editor position is added to the Quick Mark Stack before the Go To Definition operation is performed. This provides a convenient way to return to the current location.
Find All Occurrences
Find All Occurrences finds all occurrences of the highlighted text.
By default, Find All Occurrences searches the entire make path, including libraries, the system library, and subfolders. Once Find in Files parameters are modified, those parameters are used.
It only searches files with recognized DataFlex file extensions (including user-defined file name extensions).
Find All Occurrences complements the Go To Definition operation. Go To Definition will find the point where the searched symbol is declared, regardless of whether the file is in a library or is a system file. Find All Occurrences will find everywhere that the symbol is used, including within comments or quotes (unlike Go To Definition).
The found occurrences are displayed in the Find Results panel, sorted in order of the Workspace's make path. This means that Workspace folders are sorted to the top, which means the hits you are most likely interested in are at the top of the list.
Quick Mark
Adds the current file and cursor position onto the Quick Mark Stack.
The Quick Mark Stack provides a trail of Code Editor location markers that you can return to in order by "Popping" the stack. Quick Marks are useful when you are working in a particular code location and you need to go to some other file or location in the same file to read some code. With Quick Marks, you can lay down markers as you jump to different locations, then later return to each location that you left.
When you perform a Go To Definition operation (above), the current location is automatically pushed onto the Quick Mark Stack.
Shortcut key: Ctrl+Q
Pop Quick Mark
Returns to the indicated location in the Code Editor and pops that location off the Quick Mark Stack.
Shortcut key: Ctrl+Shift+Q
Open File Under Cursor
Analyzes the text under the mouse cursor to see if it can locate a corresponding file name. If a corresponding file is found, then it is opened.
Switch to Designer
Opens the Visual Designer for the current file. To ensure the object you are currently working on in the code editor is also selected when switching to the designer, press Ctrl+F7 (Locate in Code Explorer) prior to pressing F7.
Shortcut key: F7
Locate in Code Explorer
If the cursor is positioned inside a code structure that is represented in the Code Explorer, then the corresponding item in the Code Explorer treeview is selected. This will also synchronize all other modelers (e.g., Visual Designer, Properties panel) to the selected item.
Shortcut key: Ctrl+F7
Object Properties
If the cursor is positioned inside an object or class declaration, then the Properties Panel will be updated with the set of properties and events from that object or class.
Shortcut key: Ctrl+2
Run to Cursor
While debugging a program, causes the program to run to the line of code that the cursor is on.
Shortcut key: Shift+F10
Set Next Instruction
While debugging a program and stepping through code, causes the program to jump execution to the line of code that the cursor is on.
This is different from the Run to Cursor operation (above) in that the intervening lines of code are not executed (i.e., they are skipped). When using this feature, you need to consider the effects of jumping execution in this way. When used incorrectly, this operation can cause the program that you are debugging to become unstable.
Breakpoint Set/Remove
Sets a breakpoint on the current line. If the current line already has a breakpoint, then this breakpoint is removed.
You can also set or remove a breakpoint by clicking in the editor margin. See also Breakpoints Window.
Shortcut key: F9
Breakpoint Enable/Disable
If the current line contains a disabled breakpoint, then this enables the breakpoint. If the current line contains an enabled breakpoint, then this option disables the breakpoint. If no breakpoint exists on this line, then an enabled breakpoint is created. See also Breakpoints Window.
Shortcut key: Ctrl+F9
Breakpoint Condition...
Activates the Breakpoint Condition dialog.
If the line of code under the mouse cursor contains a breakpoint, then you can select this option to apply a conditional expression to the breakpoint.
Cut
Cuts the selected text to the clipboard.
Copy
Copies the selected text to the clipboard.
Paste
Pastes text from the clipboard.
Add Component to Project
If the current file is a component file and does not yet belong to the current project, then this option will add the component to the current project.
For more information, see Workspace Explorer.
Test View Component
If the current file is a view or report view component, then this option will perform the following:
- Load the special test project (you must have created or assigned a special test project first).
- Remove any view or reports from this test project.
- Add the current view (or report view) to the test project.
- Compile the test project.
- Run the test project.
See Also: Select Test View Project, Enhanced Component Testing.
Editor Help
Activates the Help system and displays the topic that describes the Studio's Code Editor.
Editor Properties…
Activates the Editor's configuration dialog.