mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 07:12:25 +01:00
Update wikipage Code Templates. (Signed-off-by:javier).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1679 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -26,11 +26,13 @@ There are two kinds of template:
|
||||
Code templates are part of EiffelStudio’s code completion mechanism. Code completion lets you choose a code template at the same place where it offers you features to call: when you type a dot character “.” after the name of an applicable local variable, attribute or function, a menu appears:
|
||||
|
||||
[[Image:target_template_1_0]]
|
||||
|
||||
Figure 1. Auto-completion with code template option
|
||||
|
||||
If there are any applicable targeted templates, the first entry says “Code templates (CTRL-Space)” and you can click it to get a list of applicable templates:
|
||||
|
||||
[[Image:target_template_1_1]]
|
||||
|
||||
Figure 2. Auto-completion with code templates option list
|
||||
|
||||
As suggested, you can also type Control-space to get the same effect. If you find a template that you like, just click it (or navigate to it in the list using the up and down arrow keys, then type Return).
|
||||
@@ -39,14 +41,13 @@ As suggested, you can also type Control-space to get the same effect. If you fin
|
||||
It's also possible to use code templates without a target after type Control-Space, if there are any applicable targetless templates, the first entry says “Code templates (CTRL-Space)” and you can click it to get a list of applicable templates. Choose the desired one by clicking or navigating.
|
||||
|
||||
[[Image:targetless_template_1_3]]
|
||||
|
||||
Figure 3. Targetless Auto-completion with code template option
|
||||
|
||||
|
||||
|
||||
When you insert a template into your code, it will often have some highlighted fields, corresponding to the template arguments, for example the lower and upper bounds of the array slice whose maximum you need:
|
||||
|
||||
|
||||
[[Image:targetless_template_1_4|680px]]
|
||||
|
||||
Figure 4. Targetless Auto-completion with code templates option list.
|
||||
|
||||
<span id="gui_template"></span>
|
||||
|
||||
Reference in New Issue
Block a user