Book a Demo
Prev Next

Code Editor Context Menu

When working on a file with a code editor, you can perform a number of code search and editing operations to review the contents of the file. These options are available through the editor context menu, and can vary depending on which code editor you are using.

Access

Context Menu

Right-click on the code text string you are working on

Options

Go to Declaration

Locate and highlight the declaration of a symbol in the source code.

Go to Definition

Locate and highlight the definition of a symbol in the source code (applicable to languages such as C++ and Delphi, where symbols are declared and defined in separate places).

Open in Grammar Editor

Opens a view that lets you examine or validate the code using the appropriate grammar.

Synchronize Tree to Editor

Finds and displays the current element (method for example) in the structure tree.

Auto Synchronize Tree and Editor

When selected, the structure tree will automatically show the element being worked on in the editor.

XML Schema Validation

Allows an XML schema to validated.

Search for '<string>'

Display a submenu providing options to locate the selected text string in a range of locations.

  • 'Find in Project Browser' - Highlight the object containing the selected text in the Browser window
  • 'Search in Open Files' - Search for the selected text string in associated open files and display the results of the search in the Find in Files window; you can refine and refresh the search by specifying criteria on the Find in Files window toolbar
  • 'Search in Files' - Search for the selected text string in all associated files (closed or open), and display the results of the search in the Find in Files window; you can refine and refresh the search by specifying criteria on the Find in Files window toolbar (shortcut key: F12)
  • 'Search in Model' - Perform an 'Element Name' search in the Model Search facility, and display the results on the Model Search tab
  • 'Search in Scripts' - (Available while working in the Script Editor) Open the Find in Files window, set the 'Search Path' field to 'Search in Scripts' and the 'Search Text' field to the selected text, then search all scripts for the text string and display the results of the search; you can refine and refresh the search by specifying criteria on the Find in Files window toolbar
  • 'EA User Guide' - Display the description of the code item in the Enterprise Architect User Guide
  • 'Google' - Display the results of a Google search on the text
  • 'MSDN' - Display the results of a search on the text in the Microsoft Developer Network (MSDN)
  • 'Sun Java SE' - Display the results of a search on the text in the Sun Microsystems 'Sun Search' facility
  • 'Wikipedia' - Display any entry on the object on the Wikipedia web site
  • 'Koders' - Display the results of a search for the text string on Koders.com
Search In Files Model Search Pre-Defined Searches Script Editor

Search Intelli-sense

Perform a  search on the specified string using the Code Miner service or library specified in the current Analyzer Script. The results are displayed in the 'Code Miner' tab of the Find in Files window.

Shortcut key: Shift+F12

Search Intelli-sense

Set Debugger to Line

(If the debugger is executing and has reached a breakpoint.) Move the execution point to the current line. Check that you do not skip over any code or declarations that affect the next section of code being debugged.

Display Variable

(If the debugger is executing.) Open the Locals window and highlight the local variable for the current point in the code.

View the Local Variables

Show in String Viewer

Display the full contents of a variable string in the String Viewer.

View Content Of Long Strings

Create Use Case for '<string>'

Display the 'Create Use Case For Method' dialog, through which you create a Use Case for the method containing the text string.

Create Use Case For Method

Breakpoint

Display a submenu of options for creating a recording marker on the selected line of code. The recording markers you can add include:

  • Breakpoint
  • Start Recording Marker
  • End Recording Marker
  • Stack Auto Capture Marker
  • Method Auto Record Marker
  • Tracepoint
Set Record Markers

Testpoints

Display options to add a new Testpoint, show the Testpoints Manager (Testpoints window) or edit an existing Testpoint if one or more are already defined at the selected location.

(The sub-options depend on the type of code file you are reviewing.)

Testpoint Editor The Testpoints Window

XML Validation

Allows an XML document to be checked for compliance with its own schema references or using a user-specified schema; either a local schema file or a URL.

XML Validation

Open (Close) IME

Open (or close) the Input Method Editor, so that you can enter text in a selected foreign language script, such as Japanese. You set the keyboard language using the Windows Control Panel - Regional and Language Options facility.

Copy Position Hyperlink

Copies the cursor position as a hyperlink that can be pasted into Rich Notes editors, such as a message in the 'Chat' tab of the Chat & Mail window. Simply use the 'Paste' context menu option in the message, and specify the link text.

The reader can click on the link to open the source file and move the cursor to the selected cursor position in the file.

Copy Text Hyperlink

Copies the selected text string as a hyperlink that can pasted into Rich Notes editors, such as a message in the 'Chat' tab of the Chat & Mail window. Simply use the 'Paste' context menu option in the message.

The reader can click on the link to open the source file and move the cursor to the first occurrence of that text string in the file.

Line Numbers

(Script Editor only.) Show or hide the code line numbers on the left hand side of the editor screen.

Undo
Cut
Copy
Paste
Delete
Select All

These six options provide simple functions for editing the code.

Notes

  • The options in the lower half of the 'Search for <string>' submenu (after 'Search in Scripts') are configurable; you can add new search tools or remove existing ones by editing the searchProviders.xml file in the Sparx Systems > EA > Config folder - this file is in OpenSearch description document format

Learn more