The Editor view is shown in all perspectives.
The Editor view
The Editor view's editors show line numbers and color syntax highlighting appropriate for the scripting language being used. In addition, each editor is language-savvy and provides automatic indentation and other language-specific convenience features.
You can select these features in the Preferences dialog, where each supported scripting language has its own pane with an Editor entry. In addition, you can set general editing settings that apply to every scripting language, unless overridden, in General > Editors > Text Editors.
Hover the mouse over an Editor view tab to show the full path to the file in the view.
Right-click the line numbers or the editor's text area to open context menus. The options that are available depend on the scripting language being used. Options that are not available in the current context are grayed. Some options that are inherited from the Eclipse IDE are not functional in the Squish IDE.
Select the Make Code Data Driven option in the text area context menu to insert a loop that accesses every field in a test data file. The option is only available if there is a test data file available to the test script.
Make sure the cursor is on an empty line where you want the code to be inserted. Then choose Make Code Data Driven to open a Refactoring wizard that lists the available test data files. Click the one to use, and then click the Next button.
The wizard shows the test script's current code and the code you'll have:
Click the Finish button to insert the code.
You can Undo the changes, if necessary.
Select the Replace With TestData Field option in the text area context menu to insert a call to the String testData.field(record, fieldName) function to access a data item from a record in a test data file. The option is only available if there is a test data file available to the test script.
Make sure the cursor is where you want the code to be inserted. For example, to the right of an assignment such as
averagingTime =. Then choose Replace With TestData Field and pick a submenu option. These options correspond to the fields that are available in the current test data.
The Refactoring wizard opens. It shows the test script's current code and the code you'll have if you click the Finish button. You can Undo the changes, if necessary.
So, if the code was
averagingTime =, it has now become
averagingTime = testData.field(record, "Averaging Time").
However, it may be more convenient to use the Make Code Data Driven menu option and then copy and paste any String testData.field(record, fieldName) function calls that you need.
Right-click the line numbers in an editor to open a context menu that contains a subset of the following options, depending on the scripting language:
|Languages||Context Menu Option Name||Keyboard Shortcut||Action|
|Python||Add Breakpoint||Double Click||Adds a breakpoint.|
|Python||Remove Breakpoint||Double Click||Removes a breakpoint.|
|All||Disable Breakpoint||Shift+Double Click||Disables the breakpoint at the current line.|
|All||Enable Breakpoint||Enables the breakpoint at the current line.|
|All||Run related Test Case||Ctrl+Alt+E||Runs the test case related to the open file.|
|All||Show Quick Diff||This context menu option is currently not functional in the Squish IDE.|
|All||Show Line Numbers||Shows line numbers in the editor.|
|All||Folding||Instead of showing the entire test script, only shows the first line of each function, block, or comment. This makes it easier to see a script's overall structure. To expand or collapse individual function entries, click the or icons, or expand or collapse everything using the menu options.|
|All||Preferences||Opens the Preferences dialog Editor tab for the scripting language being used.|
|All||Breakpoint Properties||This item is only enabled if the current line has a breakpoint, in which case it opens a Properties dialog, where you can make the breakpoint more sophisticated rather than always stopping the script unconditionally.|
Click Folding in the line number context menu to select the following options:
|Submenu Option Name||Keyboard Shortcut||Action|
|Enable Folding||Ctrl+/ on the numeric keypad||Enables or disables folding.|
|Expand All||Ctrl+* on the numeric keypad||Expands all folded items.|
|Collapse All||Shift+Ctrl+/ on the numeric keypad||Collapses all unfolded foldable items.|
|Reset Structure||Shift+Ctrl+* on the numeric keypad||Expands all folded items and reevaluates the file's folding structure.|
|Collapse Blocks||Folds all foldable blocks that aren't functions.|
|Collapse Comments||Folds all foldable comments.|
Right-click the editor text area to open a context menu that contains a subset of the following options, depending on the scripting language:
|Languages||Context Menu Option Name||Keyboard Shortcut||Action|
|All||Undo||Undoes the last action.|
|All||Revert File||Restores the editor's contents to last saved. Alternatively, you can repeatedly select Undo.|
|All||Save||Saves any unsaved changes in the active editor.|
|All||Open Declaration||This menu option is not functional in the Squish IDE.|
|All||Show In||Shift+Alt+W||This menu option is not functional in the Squish IDE.|
|All||Cut||Copies the selected text to the clipboard and deletes it from the editor.|
|All||Copy||Copies the selected text to the clipboard.|
|All||Paste||Pastes the selected text from the clipboard to the editor.|
|Perl||Shift Right||Moves the current line right two spaces.|
|Perl||Shift Left||Moves the current line left two spaces (if possible).|
|All||Source||This menu option has a submenu with options shown in Source Menu. When an editor view is active, a Source menu appears in the menu bar. It has the same (or in some cases fewer) menu options as the context menu described here.|
|Perl||Perldoc||Is intended to run perldoc but is not functional in the Squish IDE.|
|Tcl||Paste to TclConsole||This menu option is not functional in the Squish IDE.|
|All||Run As||This menu option is not functional in the Squish IDE.|
|All||Debug As||This menu option is not functional in the Squish IDE.|
|All||Team||This menu option is not functional in the Squish IDE.|
|All||Compare With||This menu option is not functional in the Squish IDE.|
|All||Replace With||This menu option is not functional in the Squish IDE.|
|All||Record Snippet||Launches the AUT and begins recording a snippet into the active test case.|
|All||Make Code Data Driven||Inserts a loop that accesses every field in a test data file.|
|All||Replace With TestData Field||Inserts a call to the String testData.field(record, fieldName) function to access a data item from a record in a test data file.|
|All||Preferences||Pops up the Preferences dialog showing the preferences for the current editor view's type (e.g., Python editor, Tcl editor, etc.)|
|All||Input Methods||This menu option leads to a submenu of input method submenu options. These are useful for test engineers who are using non-Latin languages (e.g., those not using English or West European languages) and who wish to enter text in their own language|
Click Source in the editor text area context menu to to open a context menu that contains a subset of the following options, depending on the scripting language:
|Languages||Submenu Option Name||Keyboard Shortcut||Action|
|All||Toggle Comment||Shift+Ctrl+C or Ctrl+/ in a Perl editor||Comments out the current line if it is not commented out or uncomments the current line if it is commented out.|
|Perl||Validate Syntax||Shift+F5||This item is inherited from Eclipse and is redundant since the Squish IDE automatically highlights syntax errors in the left margin.|
|Perl||Pod::Checker||Shift+Ctrl+D||Checks any Perl POD (Plain Old Documentation) that is in the file and marks any problems.|
|Perl||Clear Pod::Checker Markers||Clears any markers that you set by running the |
|Perl||Clear Perl::Critic Markers||Clears any markers that you set by running |
|Perl||Clear All EPIC Markers||Clears all markers including |
© 2023 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.