With all of the enhancements and cool new features that come with TestComplete 4, it's easy to miss some of the most obvious enhancements to the Code Editor. However, we know the code editor is being used every day, so we have invested a lot of time to make it easier and more convenient to write and maintain scripts.
The Code Editor enhancement include:
Automatic Revision Marks.
Drag and Drop Managing of Routines.
Background Syntax Check.
Code Template Parameters.
National Characters Support.
Automatic Revision Marks
To make it easier to visualize and track changes to the code, the Code Editor of TestComplete 4 will automatically place a revision mark next to the changed lines of code. The revision marks are displayed on the left side of the code line as shown in the following image. Code Editor Revision Mark
Drag and Drop Managing of Routines
Using the enhanced Code Explorer panel, you can drag-and-drop routines between units, change the routine position within a unit and jump directly to the first line of a routine.
Background Syntax Check
The Code Explorer panel parses the source code while you are editing the scripts and indicates whether a unit contains a syntax error. With a double-click, you can open the unit code on the problematic line and fix the error. You can also request TestComplete to check the syntax of a unit, by right-clicking the unit in the Project Explorer panel and selecting the Check Syntax command from the context menu. In the image below, you can see that the Code Explorer and Code Editor display an identifier notifying the user that there is an error in the syntax of the script. Syntax Check
The code editor of version 4 can now highlight any word you specify in the editor's options. This enables you to highlight certain object and method names in script code. In the image below, I highlighted the Custom Highlighting
wFonts in clHotlight.
Code Template Parameters
The Code Templates can now accept more than one parameter. TestComplete asks for the parameter values every time you insert a template into your script code. Multiple Code Template Parameters
The script debugger now highlights code expressions when you are moving the mouse cursor over them while debugging a script. Highlighted Expressions
National Characters Support
The Code Editor now supports the input of national characters. You can enter national characters in the same way as you would in Notepad. For example, to enter the o character with circumflex, type [O. The image below displays French characters. National Character Support
If you are part of the beta process of TestComplete 4, try these features out and let us know what you think. For those of you who do not have the beta version, stay tuned for the release.