Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ide_script [2020/05/03 19:55]
admin [ShortCut Keys]
ide_script [2024/01/02 19:28]
admin [Plugins]
Line 10: Line 10:
   * auto formatting   * auto formatting
   * code collapse   * code collapse
-  * code assist+  * [[#code assist]]
   * search   * search
   * replace   * replace
Line 16: Line 16:
  
 The tool pallet on the upper-right corner of the editor gives you quick access to common editor features. The tool pallet on the upper-right corner of the editor gives you quick access to common editor features.
- 
 {{ wiki:idescreen:ide_script_toolbar.png? 150 }} {{ wiki:idescreen:ide_script_toolbar.png? 150 }}
  
Line 22: Line 21:
  
 Click //P// to open a dialog to activate [[#Plugins]] for the model. Click //P// to open a dialog to activate [[#Plugins]] for the model.
 +
 +----
 +
 +==== Code Assist ====
 +Code assist is supported on [[https://testoptimal.com/v6/apidocs/|system functions and plugin functions]], which includes your own custom plugins.
 +
 +Code assist can be opened with //Ctrl-Space// in one of the following:
 +  * on a blank line or after a "$"
 +
 +{{wiki:idescreen:ide_script_ca.png? 80}}
 +
 +  * on chained system or plugin function calls
 +
 +{{wiki:idescreen:ide_script_ca_sys.png? 270}}
 +
 +  * on java classes
 +
 +{{wiki:idescreen:ide_script_ca_javaclass.png? 225}}
  
 ---- ----
Line 30: Line 47:
  
 Activated plugins will automatically added to code assist (Ctrl-Space). Activated plugins will automatically added to code assist (Ctrl-Space).
 +
 +More info can be found at [[Plugins]] and [[http://testoptimal.com/v7/apidocs/ | System and Plugin Functions]].
  
 ---- ----
Line 78: Line 97:
 Listing of states and transitions that have TRIGGER script created.  Click on the state and transition to quickly scroll to the script. Listing of states and transitions that have TRIGGER script created.  Click on the state and transition to quickly scroll to the script.
  
-{{ wiki:idescreen:ide_script_triggerlist.png?100 }}+{{wiki:idescreen:ide_script_triggerlist.png?100}}
  
 ---- ----
Line 169: Line 188:
 //MCASE Script// is where //MCase// are defined. //MCASE Script// is where //MCase// are defined.
  
-//MCase// is a custom test case / workflow that you defined explicitly for the system to generate a sequence path from the model to achieve specific scenario. +Often times you may have a set of specific test scenarios you want to make sure are covered to complement the system generated test cases.  You can achieve just that with //MCase// -  a custom test case / workflow that you defined explicitly for the system to generate a sequence path from the model to achieve specific scenario. 
  
 Consider your model as a map to //GPS//, //MCase// is just a set of way points you want to visit. When you execute //MCase//, a sequence  path (trip/route) is auto-generated from your model. Consider your model as a map to //GPS//, //MCase// is just a set of way points you want to visit. When you execute //MCase//, a sequence  path (trip/route) is auto-generated from your model.
Line 182: Line 201:
 ---- ----
 ==== User Script ==== ==== User Script ====
-Besides [[#TRIGGER Script]], [[#PAGES Sript]] and [[#STEPS Script]], you may also add additional scripts.+Besides [[#TRIGGER Script]], [[#PAGES Sript]][[#STEPS Script]] and [[#MCASE Script]], you may also add additional scripts.
  
 To create a user script, click on "+" You can rename the script by clicking on the pencil mini-button. To create a user script, click on "+" You can rename the script by clicking on the pencil mini-button.
Line 201: Line 220:
       $SYS.log('multiplying 10 and 20: ' + $MyScript.multiply(10, 20));       $SYS.log('multiplying 10 and 20: ' + $MyScript.multiply(10, 20));
    }    }
 +
 +----
 +==== Include File ====
 +You may include script file into your TRIGGER script.  Just add the @INCLUDE_FILE below:
 +   @INCLUDE_FILE 'absolute file path to include file'
 +
 +The above script will literally inject the content of the included file into current script before TRIGGER script is executed.  
 +
 +The side effect of using this INCLUDE_FILE is that the injected scripts will mess up the script line # reported on errors.
  
 ---- ----
Line 206: Line 234:
 Shortcut keys allow you to perform basic editor functions with a keyboard. Below is the list of the shortcut keys (Windows key in **bold** / Mac key in //italic//): Shortcut keys allow you to perform basic editor functions with a keyboard. Below is the list of the shortcut keys (Windows key in **bold** / Mac key in //italic//):
  
-  * **Ctrl-Space** / //Cmd-Space//: Code assist when cursor is in an attribute or on a blank line+  * **Ctrl-Space**: Code assist when cursor is in an attribute or on a blank line
   * **Ctrl-A** / //Cmd-A//: Select all   * **Ctrl-A** / //Cmd-A//: Select all
-  * **Ctrl-B** / //Cmd-B//: Collapse / Expand current script tag that has children tags+  * **Ctrl-B**: Collapse / Expand current script tag that has children tags
   * **Ctrl-D** / //Cmd-D//: Delete current line   * **Ctrl-D** / //Cmd-D//: Delete current line
-  * **Ctrl-E** / //Cmd-E//: Execute highlighted script expression in [[Execution Monitor]]+  * **Ctrl-E** / //Cmd-E//: Execute highlighted script expression in [[ide_monitor |Execution Monitor]]
   * **Ctrl-F** / //Cmd-F//: Search and replace a string, enter lower case for case insensitive search   * **Ctrl-F** / //Cmd-F//: Search and replace a string, enter lower case for case insensitive search
   * **Ctrl-R** / //Cmd-R//: Code-assist: requirement   * **Ctrl-R** / //Cmd-R//: Code-assist: requirement
   * **Ctrl-I** / //Cmd-I//: Insert a state/trans trigger (Trigger script only)   * **Ctrl-I** / //Cmd-I//: Insert a state/trans trigger (Trigger script only)
   * **Ctrl-Z** / //Cmd-Z//: Undo changes   * **Ctrl-Z** / //Cmd-Z//: Undo changes
-  * **Ctrl-Y** / //Cmd-Y//: Redo changes+  * **Ctrl-Y** / //Shift-Cmd-Z//: Redo changes
   * **Ctrl-Home** or **Alt-Up** / //Cmd-Up//: Move cursor to the beginning of the script   * **Ctrl-Home** or **Alt-Up** / //Cmd-Up//: Move cursor to the beginning of the script
   * **Ctrl-End** or **Ctrl-Down** / //Cmd-Down//: Move cursor to the end of the script   * **Ctrl-End** or **Ctrl-Down** / //Cmd-Down//: Move cursor to the end of the script
Line 226: Line 254:
   * **Ctrl-[** / //Cmd-[//: shift line to the left (un-indent)   * **Ctrl-[** / //Cmd-[//: shift line to the left (un-indent)
   * **Ctrl-]** / //Cmd-]//: shift line to the right (indent)   * **Ctrl-]** / //Cmd-]//: shift line to the right (indent)
 +
 +Except for **Ctrl-R / Ctrl-I** for windows and //Cmd-R / Cmd-I// for Mac, check out [[https://codemirror.net/doc/manual.html#commands | CodeMirror Commands]] for additional key mappings and details of mapped commands.
 +