mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-04-04 09:09:22 +02:00
Author:halw
Date:2008-09-26T17:52:50.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@50 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
[[Property:title|Dialogs]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|5d543cd3-8e54-e090-44d4-ee3b51009fe6]]
|
||||
* [[New feature dialog|New feature dialog]]
|
||||
* [[Error descriptor|Error descriptor]]
|
||||
* [[External commands editor dialog|External commands editor]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
[[Property:title|New feature dialog]]
|
||||
[[Property:weight|0]]
|
||||
[[Property:uuid|deb4901a-7b5a-f669-802e-de1efefcc1a0]]
|
||||
* [[New feature dialog: Introduction|Introduction]]
|
||||
* [[New feature dialog overview|Overview]]
|
||||
* [[New procedure layout|Procedure layout]]
|
||||
* [[New function layout|Function layout]]
|
||||
* [[New attribute layout|Attribute layout]]
|
||||
* [[New feature dialog: feature properties modification|Feature properties modification]]
|
||||
|
||||
The new feature dialog window lets you create simple Eiffel features using the coding standards described in [http://www.eiffel.com/doc/oosc/ Object-Oriented Software Construction, Second Edition]. It automates the task of writing set-procedures for attributes and it makes it easy for you to find the right feature clause for a new feature. The new feature dialog can be invoked whenever you have a class open in a development window. It is also used by the diagram tool when creating a client-supplier link.
|
||||
|
||||
==Use it when...==
|
||||
* You want to be introduced to the style rules for Eiffel code as described in [http://www.eiffel.com/doc/oosc/ Object-Oriented Software Construction, Second Edition] , chapter 26.5 (page 891).
|
||||
* You want to create an attribute and you also want an invariant and/or a set-procedure generated for it.
|
||||
* You want to add a feature in a feature clause that is not in your class yet, and you do not remember the feature clause order, or you want to add it in a feature clause that is in your class, but you cannot find it.
|
||||
|
||||
==Do not use it when...==
|
||||
* You want to edit an existing feature. This is not possible, you can only create new features with it.
|
||||
* You want to write a more advanced feature. With the feature wizard, you can enter only a single line of code.
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ When clicking '''Attribute''', the window changes to the attribute layout. It ha
|
||||
* [[Set-procedure|Set-procedure check box]]
|
||||
|
||||
==Example==
|
||||
<div> [[Image:feature-wizard-attribute-example]] </div>
|
||||
This dialog box:<br/>
|
||||
<div> [[Image:feature-wizard-attribute-example]] </div><br/>
|
||||
Produces this feature:<br/>
|
||||
<code>class
|
||||
PRODUCT
|
||||
|
||||
|
||||
@@ -3,12 +3,15 @@
|
||||
[[Property:uuid|f2d63c29-6be2-b3d9-a735-b18e08c5a678]]
|
||||
For functions and procedures, you can build a formal argument list. You can do this by clicking on the '''New argument''' button as many times as you need arguments.
|
||||
|
||||
{{note|Even though this dialog always shows parentheses, they are not generated if the list is empty (Eiffel's command-query separation (CQS) principle). }}
|
||||
<div> [[Image:feature-wizard-3-arguments]] </div>
|
||||
{{note|Even though this dialog always shows parentheses, if the list is empty, empty parentheses will not generated. In other words, the dialog will generate the correct Eiffel syntax. }}
|
||||
|
||||
|
||||
<div> [[Image:feature-wizard-3-arguments]] </div><br/>
|
||||
{{note|If you add arguments to a routine, it is not possible anymore to select routine type '''once'''. }}
|
||||
|
||||
|
||||
For every attribute you selected, enter a name in the text box and a type using the [[Type selection|type selection]] .
|
||||
<div> [[Image:feature-wizard-1-argument]] </div>
|
||||
<div> [[Image:feature-wizard-1-argument]] </div><br/>
|
||||
The code that is generated:
|
||||
<code>set_name (s: STRING) is
|
||||
do
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
[[Property:uuid|019ea318-e0e0-dae9-a818-e12232aa8431]]
|
||||
The feature you create will be inserted in the feature clause you specified. If the feature clause was not already in your class, or not in the right place, EiffelStudio adds the feature clause to the class text based on the feature clause order specified in the [[Preferences Reference|preferences]] . By default, this is the order used by the Eiffel Software libraries, such as EiffelBase.
|
||||
==Export status==
|
||||
The export status is the class the feature is accessible for. Usually, this is <eiffel>ANY</eiffel> for public features, or <eiffel>NONE</eiffel> for implementation features, but you can specify any class here.
|
||||
The export status is the class the feature is accessible for. Usually, this is <eiffel>ANY</eiffel> for public features, or <eiffel>NONE</eiffel> for implementation features, but you can specify any class here. <br/>
|
||||
[[Image:feature-wizard-export]]
|
||||
|
||||
{{note|In the class text, you can export a feature to more than one class but (for simplicity) not with this dialog. }}
|
||||
|
||||
==Feature clause names==
|
||||
For feature clause names it is recommended that you pick one from the standard ones, but it is also possible to create a new one. If you have introduced a special feature clause name in your project, add it to the feature clause order list in the [[Preferences Reference|preferences]] and it will also appear in this dialog.
|
||||
For feature clause names it is recommended that you pick one from the standard ones, but it is also possible to create a new one. If you have introduced a special feature clause name in your project, add it to the feature clause order list in the [[Preferences Reference|preferences]] and it will also appear in this dialog. <br/>
|
||||
[[Image:feature-wizard-clausenames]]
|
||||
|
||||
==Generated code==
|
||||
The code that is inserted in your class as a result of the selections made for the feature clause, is of the form:
|
||||
<code>feature {EXPORT} -- Clause name</code>
|
||||
except if you specified <eiffel>ANY</eiffel> as export status, which is similar to having no export status.
|
||||
The code that is inserted in your class as a result of the selections made for the feature clause, is of the form: <br/>
|
||||
<code>feature {EXPORT} -- Clause name</code><br/>
|
||||
except if you specified <eiffel>ANY</eiffel> as export status, which is similar to having no export status. <br/>
|
||||
<code>feature --Clause name</code>
|
||||
<br/>
|
||||
For example, if you specified a the "Initialization" feature clause name, and specified <eiffel>NONE</eiffel> as export status, you get:
|
||||
For example, if you specified a the "Initialization" feature clause name, and specified <eiffel>NONE</eiffel> as export status, you get: <br/>
|
||||
<code>feature {NONE} -- Initialization</code>
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
[[Property:title|New feature dialog: feature properties modification]]
|
||||
[[Property:weight|5]]
|
||||
[[Property:uuid|60825ef4-7bc2-d472-8b09-25769689bb34]]
|
||||
* [[Feature clauses|Feature clauses]]
|
||||
* [[Name field|Name field]]
|
||||
* [[Argument list|Argument list]]
|
||||
* [[Header comment|Header comment]]
|
||||
* [[Precondition|Precondition]]
|
||||
* [[Local variable|Local variable]]
|
||||
* [[Feature body|Feature body]]
|
||||
* [[Postcondition|Postcondition]]
|
||||
* [[Type selection|Type selection]]
|
||||
* [[Invariant field|Invariant]]
|
||||
* [[Set-procedure|Set-procedure]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@ When clicking '''Function''', the dialog changes to the function layout. It has
|
||||
* [[Postcondition|Postcondition field]]
|
||||
|
||||
==Example==
|
||||
<div> [[Image:feature-wizard-function-example]] </div>
|
||||
This dialog box:<br/>
|
||||
<div> [[Image:feature-wizard-function-example]] </div><br/>
|
||||
Produces this feature:<br/>
|
||||
<code>class
|
||||
PRODUCT
|
||||
|
||||
|
||||
@@ -13,7 +13,10 @@ When clicking '''Procedure''', the window changes to the procedure layout. It ha
|
||||
* [[Postcondition|Postcondition field]]
|
||||
|
||||
==Example==
|
||||
<div> [[Image:feature-wizard-procedure-example]] </div>
|
||||
|
||||
This dialog box:<br/>
|
||||
<div> [[Image:feature-wizard-procedure-example]] </div><br/>
|
||||
Produces this feature:<br/>
|
||||
<code>class
|
||||
PRODUCT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user