Update wikipage Code Templates. (Signed-off-by:javier).

git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1685 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
eiffel-org
2016-11-22 13:48:48 +00:00
parent 532705a3c0
commit 22260d02bb

View File

@@ -54,8 +54,8 @@ Figure 4. Targetless Auto-completion with code templates option list.
= Where does EiffelStudio find the templates? = = Where does EiffelStudio find the templates? =
To offer the template menus seen above, EiffelStudio looks in two locations: To offer the template menus seen above, EiffelStudio looks in two locations:
Standard templates, found in * Standard templates, found in
User-defined templates, which you can add at * User-defined templates, which you can add at
<span id="template_definition"></span> <span id="template_definition"></span>
=What does a template definition look like?= =What does a template definition look like?=
@@ -93,9 +93,12 @@ feature -- Templates
end end
end end
end end
</code> </code>
This class defines two templates: maximum for the maximum of an entire array, and slice_maximum for the maximum of some contiguous part (“slice”) of that array.
That was a targeted template: EiffelStudio will propose it whenever the user types a dot after a target of type ARRAY [T] where T is a “COMPARABLE”. Note how you specify the target: as the actual generic parameters of TEMPLATE; thats why the definition starts here as
<span id="gui_template"></span> <span id="gui_template"></span>
=Associating GUI with Template definition= =Associating GUI with Template definition=
The following image shows the relationship between the template definition and how they will look in the GUI. The following image shows the relationship between the template definition and how they will look in the GUI.