Difference between revisions of "Expression Assist"
Line 4: | Line 4: | ||
− | Expression Assist provides context-sensitive help information as you type an expression. The information updates with each keystroke as you type, displaying function parameters and possible identifier or index label completions. Identifier completion can also save you keystrokes and reduce the risk of typos. | + | '''Expression Assist''' provides context-sensitive help information as you type an expression. The information updates with each keystroke as you type, displaying function parameters and possible identifier or index label completions. Identifier completion can also save you keystrokes and reduce the risk of typos. |
'''Enabling or disabling''': Expression Assist is turned on or off from the '''Preference '''dialog. | '''Enabling or disabling''': Expression Assist is turned on or off from the '''Preference '''dialog. | ||
Line 10: | Line 10: | ||
When the preference is off, you can still access the feature while typing an expression by pressing ''Ctrl+Space ''or ''Ctrl+Shift+?''. ''Ctrl+Space ''displays the help only once (but only if the Expression Assist has something to display at the current context of the caret), while ''Ctrl+Shift+? ''temporarily toggles the feature for the field being edited. | When the preference is off, you can still access the feature while typing an expression by pressing ''Ctrl+Space ''or ''Ctrl+Shift+?''. ''Ctrl+Space ''displays the help only once (but only if the Expression Assist has something to display at the current context of the caret), while ''Ctrl+Shift+? ''temporarily toggles the feature for the field being edited. | ||
− | When the preference is on, it automatically appears as you are typing an expression into a | + | When the preference is on, it automatically appears as you are typing an expression into a [[Definition]] or [[Check attribute]], changing with each keystroke. Occasionally the '''Expression Assist''' popups will block something else on the screen that you wish to see. When this happens, press the ''Esc ''key to temporarily remove the popups. They will reappear was you start typing again. To remove them for a span of keystrokes, press ''Ctrl+Shift+? ''to toggle the pops off and on. |
'''Identifier completion''': As you begin to type an identifier, a listing of possible identifier completions appears. | '''Identifier completion''': As you begin to type an identifier, a listing of possible identifier completions appears. | ||
Line 28: | Line 28: | ||
The first line of the popup shows the parameters to the function being entered, with the current parameter being entered is shown in bold and optional parameters in italics. You can click on the parameter name to insert the parameter name with a colon into the definition for named parameter syntax. | The first line of the popup shows the parameters to the function being entered, with the current parameter being entered is shown in bold and optional parameters in italics. You can click on the parameter name to insert the parameter name with a colon into the definition for named parameter syntax. | ||
− | '''Subscript help''': When entering a subscript or slice operation, <code>X[I = v]</code> or <code>X[@I = n]</code>, Expression Assist can in some cases provide a listing of the indexes of <code>X</code> when you are about to type the index name, <code>I</code>. When it can do this, the list of possible indexes appears immediately after you type the left bracket. Expression Assist will only provide the list of indexes when it can do so without initiating any evaluation, which means that <code>X</code> must be a single identifier (not a computed expression) and the value of <code>X</code> must have been previously evaluated and cached. | + | '''Subscript help''': When entering a subscript or slice operation, <code>X[I = v]</code> or <code>X[@I = n]</code>, Expression Assist can in some cases provide a listing of the indexes of <code>X</code> when you are about to type the index name, <code>I</code>. When it can do this, the list of possible indexes appears immediately after you type the left bracket. '''Expression Assist''' will only provide the list of indexes when it can do so without initiating any evaluation, which means that <code>X</code> must be a single identifier (not a computed expression) and the value of <code>X</code> must have been previously evaluated and cached. |
:[[File:Chapter8 20.png]] | :[[File:Chapter8 20.png]] | ||
− | Similarly, when you get to the index value, <code>v</code>, Expression Assist can in many cases display the set of possible index labels as an autocompletion list. Again, suggested values are only displayed when it can do so without initiating evaluation. This is generally possible for indexes defined as lists, or for computed indexes that have been previously evaluated. | + | Similarly, when you get to the index value, <code>v</code>, '''Expression Assist''' can in many cases display the set of possible index labels as an autocompletion list. Again, suggested values are only displayed when it can do so without initiating evaluation. This is generally possible for indexes defined as lists, or for computed indexes that have been previously evaluated. |
:[[File:Chapter8 21.png]] | :[[File:Chapter8 21.png]] | ||
Line 44: | Line 44: | ||
* [[Parsed Expressions]] | * [[Parsed Expressions]] | ||
* [[Expressions that don't array-abstract]] | * [[Expressions that don't array-abstract]] | ||
+ | * [[Definition]] | ||
+ | * [[Check attribute]] | ||
<footer>The Expression popup menu / {{PAGENAME}} / Object Finder dialog</footer> | <footer>The Expression popup menu / {{PAGENAME}} / Object Finder dialog</footer> |
Revision as of 00:52, 10 March 2016
Expression Assist provides context-sensitive help information as you type an expression. The information updates with each keystroke as you type, displaying function parameters and possible identifier or index label completions. Identifier completion can also save you keystrokes and reduce the risk of typos.
Enabling or disabling: Expression Assist is turned on or off from the Preference dialog.
When the preference is off, you can still access the feature while typing an expression by pressing Ctrl+Space or Ctrl+Shift+?. Ctrl+Space displays the help only once (but only if the Expression Assist has something to display at the current context of the caret), while Ctrl+Shift+? temporarily toggles the feature for the field being edited.
When the preference is on, it automatically appears as you are typing an expression into a Definition or Check attribute, changing with each keystroke. Occasionally the Expression Assist popups will block something else on the screen that you wish to see. When this happens, press the Esc key to temporarily remove the popups. They will reappear was you start typing again. To remove them for a span of keystrokes, press Ctrl+Shift+? to toggle the pops off and on.
Identifier completion: As you begin to type an identifier, a listing of possible identifier completions appears.
In this example, the list of shows identifiers starting with “D”, the part of the identifier typed so far. At the top above the separator line appears inputs to the variable, for which arrows had been previously drawn. The Standard tab is selected, so that the more esoteric identifiers are not included. The Advanced tab includes object identifiers that are only relevant to advanced meta-programming topics, such as attribute and module names. The mouse wheel can be used to scroll the list. At this point, pressing the Tab key would insert the first item, Depreciation
, into your definition. As you continue to type, the list of possible completions narrows:.
Clicking on an entry, or pressing the down-arrow to select the entry of interest and pressing Tab or Enter inserts the identifier into your expression.
Function parameter info: When you are editing a parameter argument to a function, Expression Assist displays the list of parameter names and the function’s description.
The first line of the popup shows the parameters to the function being entered, with the current parameter being entered is shown in bold and optional parameters in italics. You can click on the parameter name to insert the parameter name with a colon into the definition for named parameter syntax.
Subscript help: When entering a subscript or slice operation, X[I = v]
or X[@I = n]
, Expression Assist can in some cases provide a listing of the indexes of X
when you are about to type the index name, I
. When it can do this, the list of possible indexes appears immediately after you type the left bracket. Expression Assist will only provide the list of indexes when it can do so without initiating any evaluation, which means that X
must be a single identifier (not a computed expression) and the value of X
must have been previously evaluated and cached.
Similarly, when you get to the index value, v
, Expression Assist can in many cases display the set of possible index labels as an autocompletion list. Again, suggested values are only displayed when it can do so without initiating evaluation. This is generally possible for indexes defined as lists, or for computed indexes that have been previously evaluated.
Because these suggestions can be extremely helpful when typing definitions, you may find it useful to evaluate parent variables before you start typing the definition.
See Also
- Tutorial: Expression Assist
- The Expression popup menu
- Expression Syntax
- Parsed Expressions
- Expressions that don't array-abstract
- Definition
- Check attribute
Enable comment auto-refresher