Action logic editor provides capabilities to select multiple statements and perform block level actions. You start off by selecting one or more statements and then using either the context menu or commonly known keyboard short-cuts.
Selecting one or more statements
Start by clicking anywhere on a statement, except on editable parameters and dropdowns. You can also click in the white/empty space to the right-side of a statement.
You can now extend this selection to multiple lines by either using the keyboard up/down arrow keys or by shift-click on a group of statements.
Ctrl-A or Cmd-A (Mac) selects all statements in an Action.
Note: ACCELQ only allows selection of consecutive statements. In other words, you cannot use Ctrl-Click to select disconnected groups of statements.
Context Menu operations
Once a selection is made, here are the context menu options available for editing.
New Statement After
Creates a new statement at the end of the currently selected statement block
|New Statement Before||Shift-Enter||Creates a new statement at the beginning of the currently selected statement block|
|Copies the selected block for subsequent pasting|
|Cuts the selected block for subsequent pasting. Operation is ignore when you press Escape.|
Pastes the copy/cut statement block after the statement where the cursor currently is.
You can also use this keyboard short-cut to paste the content in a new-statement field.
|Pastes the copy/cut statement block before the statement where the cursor currently is.|
|Delete||Del||Deletes the selected statement block|
|Comment||/||Comments out all the selected statements.|
|Uncomments all the selected statements.|
|Capture/Ignore Return Value||
For a statement that returns a value, either capture or ignore the return value (depending on the current state of the statement).
Only available for single statement selection.
Basic help on the command being used in the selected statement. Applicable only for single statement selection.
Note: drag/drop operation that was supported to move statements in the Action logic is now removed. This is replaced with the comprehensive cut/paste operation.
Maintaining Action logic integrity
While performing any of the operations listed above, ACCELQ ensures the integrity of logic is always maintained. When there is a risk of creating integrity issues, system alerts and aborts the operation.
For example, if you are trying to delete a selection of statements that includes "Repeat" statement without selecting the corresponding "End Repeat", the operation is not permitted.
This approach is consistently followed in all operations so that the logic does not ever end up in an inconsistent state.
Copy/Paste of statements
Copy/paste operation is functionally designed to ensure maximum coverage of situations. A set of statements in Action logic may have dependencies such as Action Parameters and Elements in the repository. When you paste the copied statements, system automatically addresses all such dependencies.
For example, consider you copied a set of statements in an Action which include Input Parameters. When you now paste these statements in a different Action, system automatically creates required Input Parameters. If the new Action has any existing Parameter matching with the ones required for the paste operation, it is automatically re-used.
|Dependency||Paste operation location||What happens|
In the same Action
|In a different Action in the same Context||Creates parameters if no matching ones are found in the target Action|
|In a different Action in a different Context||Same as above|
|Elements used in statements||Same Action||No impact|
|In a different Action in the same Context||No impact, all the elements already exist in the Context.|
|In a different Action in a different Context||
Creates missing elements as abstract elements. An element is considered "missing" unless a same name element with same element-type is found in the new Context.
Name clashes are resolved with an automatic suffix.
Note: If any new abstract element is created as part of the "paste" operation, it must be either mapped to a View or must be provided advanced Selector before running this logic in target Action.