mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Author:halw
Date:2009-01-08T15:40:11.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@155 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -6,11 +6,11 @@ Let us get back to EiffelStudio. We won't need a browser any more for this Tour,
|
|||||||
|
|
||||||
Before studying the documentation generation we saw how to display properties of <span>classes</span>. It's also interesting to explore the properties of <span>features</span>. Let's look at this now, through the Feature View.
|
Before studying the documentation generation we saw how to display properties of <span>classes</span>. It's also interesting to explore the properties of <span>features</span>. Let's look at this now, through the Feature View.
|
||||||
|
|
||||||
Your Development Window should still be targeted to class <code> LIST </code>, from the last view, <code> Routines </code>, that you displayed on it. If you've lost it, just retarget a Development Window to this class.
|
Your Development Window should still be targeted to class <code>LIST</code>, from the last view, <code>Routines</code>, that you displayed on it. If you've lost it, just retarget a Development Window to this class.
|
||||||
|
|
||||||
If the Features Tool is not visible, bring it back by clicking the <code> Features </code> button on the top toolbar, used earlier to remove it.
|
If the Features Tool is not visible, bring it back by clicking the <code>Features</code> button on the top toolbar, used earlier to remove it.
|
||||||
|
|
||||||
(Another way is through the menu entry <code> View </code> <code> --> </code> <code> Tools </code> <code> --> </code> <code> Features </code> ).
|
(Another way is through the menu entry <code lang=text>View --> Tools --> Features</code> ).
|
||||||
|
|
||||||
==Targeting to a feature==
|
==Targeting to a feature==
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ The list of features, organized by feature clauses, appears on the left:
|
|||||||
|
|
||||||
[[Image:index-51]]
|
[[Image:index-51]]
|
||||||
|
|
||||||
The class only has a few immediate features because most of its interesting features are inherited. Make sure the Editing Tool is tall enough (as on the above figure) and click the feature <code> forth </code>, the last one, in the Feature Tree on the left. This makes the feature the Editing Tool's current target, and scrolls the text to its declaration:
|
The class only has a few immediate features because most of its interesting features are inherited. Make sure the Editing Tool is tall enough (as on the above figure) and click the feature <code>forth</code>, the last one, in the Feature Tree on the left. This makes the feature the Editing Tool's current target, and scrolls the text to its declaration:
|
||||||
|
|
||||||
[[Image:index-52]]
|
[[Image:index-52]]
|
||||||
|
|
||||||
Note how both of the top target fields are now filled: the first one shows the target class, <code> LIST </code>, and the second one shows the target feature, <code> forth </code>.
|
Note how both of the top target fields are now filled: the first one shows the target class, <code>LIST</code>, and the second one shows the target feature, <code>forth</code>.
|
||||||
|
|
||||||
==Basic feature information==
|
==Basic feature information==
|
||||||
|
|
||||||
@@ -30,45 +30,45 @@ Now let's look at the feature views. Click the Feature Tab at the bottom of the
|
|||||||
|
|
||||||
This brings up basic information on the selected feature in the Context Tool.
|
This brings up basic information on the selected feature in the Context Tool.
|
||||||
|
|
||||||
The bottom Context Tool shows one of the Feature views, by default <code> Flat </code>. The flat view of a feature, similar in concept to the flat view of a class, gives the full text of a feature, taking into account any inherited precondition or postcondition clauses. Here the feature as declared in the class appears in the top Editing Tool, with no precondition and an <code> ensure then </code> postcondition clause. But it's a redefinition of an inherited feature; the flat view in the bottom Context Tool shows the full precondition, inherited from the ancestor <code> LINEAR </code>, as well as the postcondition from <code> LIST </code>.
|
The bottom Context Tool shows one of the Feature views, by default <code>Flat</code>. The flat view of a feature, similar in concept to the flat view of a class, gives the full text of a feature, taking into account any inherited precondition or postcondition clauses. Here the feature as declared in the class appears in the top Editing Tool, with no precondition and an <code>ensure then</code> postcondition clause. But it's a redefinition of an inherited feature; the flat view in the bottom Context Tool shows the full precondition, inherited from the ancestor <code>LINEAR</code>, as well as the postcondition from <code>LIST</code>.
|
||||||
|
|
||||||
<code> Flat </code> is just one of the available Feature Views, shown by the buttons on the Feature View toolbar
|
<code>Flat</code> is just one of the available Feature Views, shown by the buttons on the Feature View toolbar
|
||||||
|
|
||||||
<code> Text </code> gives the feature text, fully clickable.
|
<code>Text</code> gives the feature text, fully clickable.
|
||||||
<div>
|
<div>
|
||||||
==Who calls this feature?==
|
==Who calls this feature?==
|
||||||
|
|
||||||
Next to <code> Flat </code> is <code> Callers </code>. Try it now by clicking the corresponding button (the following figure and the next only show the Context Tool, where the views appear):
|
Next to <code>Flat</code> is <code>Callers</code>. Try it now by clicking the corresponding button (the following figure and the next only show the Context Tool, where the views appear):
|
||||||
|
|
||||||
[[Image:index-55]]
|
[[Image:index-55]]
|
||||||
|
|
||||||
This view shows all the places in the system that call the routine, or one of its redefinitions. Such information can be invaluable for debugging in particular. The successive paragraphs correspond to the various versions of <code> forth </code> in class <code> LIST </code>, its ancestors and its descendants. Reading from the top we see that:
|
This view shows all the places in the system that call the routine, or one of its redefinitions. Such information can be invaluable for debugging in particular. The successive paragraphs correspond to the various versions of <code>forth</code> in class <code>LIST</code>, its ancestors and its descendants. Reading from the top we see that:
|
||||||
* The version from <code> LIST </code> is called in <code> LIST </code> itself by the function <code> is_equal </code>.
|
* The version from <code>LIST</code> is called in <code>LIST</code> itself by the function <code>is_equal</code>.
|
||||||
* The version from <code> LIST's </code> descendant <code> ARRAYED_CIRCULAR </code> is not called directly in this system, although it '''could''' be called through dynamic binding (on an entity declared of type <code> LIST </code> but dynamically attached to an instance of <code> ARRAYED_CIRCULAR </code>).
|
* The version from <code>LIST's</code> descendant <code>ARRAYED_CIRCULAR</code> is not called directly in this system, although it '''could''' be called through dynamic binding (on an entity declared of type <code>LIST</code> but dynamically attached to an instance of <code>ARRAYED_CIRCULAR</code>).
|
||||||
* About 60% down, <code> forth </code> from <code> ARRAYED_LIST </code>, a version in another descendant of <code> LIST </code>, is called by two routines of <code> ARRAYED_CIRCULAR </code>, one routine of <code> ARRAYED_LIST </code>, and two routines of <code> MULTI_ARRAY_LIST </code>.
|
* About 60% down, <code>forth</code> from <code>ARRAYED_LIST</code>, a version in another descendant of <code>LIST</code>, is called by two routines of <code>ARRAYED_CIRCULAR</code>, one routine of <code>ARRAYED_LIST</code>, and two routines of <code>MULTI_ARRAY_LIST</code>.
|
||||||
* Also note, in the following entry, that after renaming <code> forth </code> is called <code> back </code> in the descendant <code> ARRAYED_STACK </code>.
|
* Also note, in the following entry, that after renaming <code>forth</code> is called <code>back</code> in the descendant <code>ARRAYED_STACK</code>.
|
||||||
|
|
||||||
The following five view buttons are similar except that they let you precise what kind of callers you are looking for, or what is being called by the currently selected feature.
|
The following five view buttons are similar except that they let you precise what kind of callers you are looking for, or what is being called by the currently selected feature.
|
||||||
|
|
||||||
==What happens to my feature through the inheritance hierarchy?==
|
==What happens to my feature through the inheritance hierarchy?==
|
||||||
|
|
||||||
After the caller/callee views, the next view button is <code> Implementers. </code>
|
After the caller/callee views, the next view button is <code>Implementers</code>.
|
||||||
|
|
||||||
This is a very useful view, showing all the ancestors and descendants of <code> LIST </code> that provide a separate version of <code> forth </code>, including the original introduction of this feature in <code> LINEAR </code> and subsequent redeclarations (redefinitions or effectings). The mention <code> (from version) </code> signals the version applicable to the current class, here <code> LIST </code>.
|
This is a very useful view, showing all the ancestors and descendants of <code>LIST</code> that provide a separate version of <code>forth</code>, including the original introduction of this feature in <code>LINEAR</code> and subsequent redeclarations (redefinitions or effectings). The mention <code lang=text>(version from)</code> signals the version applicable to the current class, here <code>LIST</code>.
|
||||||
|
|
||||||
Since all class and feature names on these views are hyperlinks, you can display any of the listed versions in a new Development Window by control-right-clicking it (we will see shortly how to display it in the <span>same</span> tool). Right-click on the feature name <code> forth </code> on the line that reads <code> MULTI_ARRAY_LIST forth </code>. This brings up a context menu and chose `Show->Text'. The tool is now targeted to the routine <code> forth </code> from <code> MULTI_ARRAY_LIST </code>, so that you can see the implementation of the routine in that class.
|
Since all class and feature names on these views are hyperlinks, you can display any of the listed versions in a new Development Window by control-right-clicking it (we will see shortly how to display it in the <span>same</span> tool). Right-click on the feature name <code>forth</code> on the line that reads <code>MULTI_ARRAY_LIST forth</code>. This brings up a context menu and chose <code lang=text>Show --> Text</code>. The tool is now targeted to the routine <code>forth</code> from <code>MULTI_ARRAY_LIST</code>, so that you can see the implementation of the routine in that class.
|
||||||
|
|
||||||
We still have two unexplored views, <code> Ancestor versions </code> and <code> Descendant versions </code>. Click the first of these to obtain the ancestor versions of <code> forth </code> from <code> MULTI_ARRAY_LIST </code>.
|
We still have two unexplored views, <code>Ancestor versions</code> and <code>Descendant versions</code>. Click the first of these to obtain the ancestor versions of <code>forth</code> from <code>MULTI_ARRAY_LIST</code>.
|
||||||
|
|
||||||
The format is self-explanatory: for each ancestor of <code> MULTI_ARRAY_LIST </code> that has a version of <code> MULTI_ARRAY_LIST </code> 's <code> forth </code> feature, it indicates the name of that feature -- which could be something else than <code> forth </code> as a result of renaming, although here this happens only in descendants, not ancestors -- and the version of the feature applicable to the given class.
|
The format is self-explanatory: for each ancestor of <code>MULTI_ARRAY_LIST</code> that has a version of <code>MULTI_ARRAY_LIST</code> 's <code>forth</code> feature, it indicates the name of that feature -- which could be something else than <code>forth</code> as a result of renaming, although here this happens only in descendants, not ancestors -- and the version of the feature applicable to the given class.
|
||||||
|
|
||||||
In the case of feature merging (combining several features inherited from different parents, in conformance with the rules of the language) there could be more than one history branch, in this case each branch is labeled <code> Branch #X. </code>
|
In the case of feature merging (combining several features inherited from different parents, in conformance with the rules of the language) there could be more than one history branch, in this case each branch is labeled <code>Branch #X.</code>
|
||||||
|
|
||||||
The next button, <code> Descendant versions </code>, similarly tells you all that happens to a feature in the descendants of the current class.
|
The next button, <code>Descendant versions</code>, similarly tells you all that happens to a feature in the descendants of the current class.
|
||||||
</div><div>
|
</div><div>
|
||||||
==Who has the same name?==
|
==Who has the same name?==
|
||||||
|
|
||||||
The last button, <code> Homonyms </code>, displays all the features of the system which, related or not to the current feature by redeclaration, have the same name. You can then explore any such feature to see if the relationship is more than casual.
|
The last button, <code>Homonyms</code>, displays all the features of the system which, related or not to the current feature by redeclaration, have the same name. You can then explore any such feature to see if the relationship is more than casual.
|
||||||
|
|
||||||
In any system or library that takes advantage of inheritance and its associated mechanisms -- renaming, redefinition, effecting, undefinition, multiple and repeated inheritance, polymorphism, dynamic binding -- the feature browsing facilities that we have just explored are invaluable to track what happens to features. What makes them even more precious is their connection with the rest of the browsing and documentation capabilities, especially the pick-and-drop which we will now study.
|
In any system or library that takes advantage of inheritance and its associated mechanisms -- renaming, redefinition, effecting, undefinition, multiple and repeated inheritance, polymorphism, dynamic binding -- the feature browsing facilities that we have just explored are invaluable to track what happens to features. What makes them even more precious is their connection with the rest of the browsing and documentation capabilities, especially the pick-and-drop which we will now study.
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,27 +6,27 @@ So far we have relied on existing class texts. Fascinating as it may be to explo
|
|||||||
|
|
||||||
==Recompiling==
|
==Recompiling==
|
||||||
|
|
||||||
When we started, we compiled the example system. Let's recompile it, just to see. We'll see compilation entries in the <code> Project </code> menu, but the easiest for the moment is to use the compilation button in the Project toolbar, the lower toolbar in the Development Window. Click this button. You haven't changed anything in the project since it was compiled (you were not supposed to!), so EiffelStudio will very quickly detect this and finish compilation. On our test platform this takes less than a second. Now of course we should see what happens if you do change something.
|
When we started, we compiled the example system. Let's recompile it, just to see. We'll see compilation entries in the <code>Project</code> menu, but the easiest for the moment is to use the compilation button in the Project toolbar, the lower toolbar in the Development Window. Click this button. You haven't changed anything in the project since it was compiled (you were not supposed to!), so EiffelStudio will very quickly detect this and finish compilation. On our test platform this takes less than a second. Now of course we should see what happens if you do change something.
|
||||||
<div>
|
<div>
|
||||||
==Editing==
|
==Editing==
|
||||||
|
|
||||||
We don't want to touch EiffelBase classes (and in fact can't, since it is used in precompiled form), so let's focus on classes of our small root cluster. In the Cluster tree on the left, expand cluster <code> root_cluster </code> and click class <code> PARENT </code> to retarget the Development Window to it.
|
We don't want to touch EiffelBase classes (and in fact can't, since it is used in precompiled form), so let's focus on classes of our small root cluster. In the Cluster tree on the left, expand cluster <code>root_cluster</code> and click class <code>PARENT</code> to retarget the Development Window to it.
|
||||||
|
|
||||||
Make sure that the Editing Tool is big enough to display the text of the class:
|
Make sure that the Editing Tool is big enough to display the text of the class:
|
||||||
|
|
||||||
[[Image:index-66]]
|
[[Image:index-66]]
|
||||||
|
|
||||||
The Editing Tool hosts a text editor which you can use to change the class text. Here the routine <code> display </code> starts by outputting a simple message; let's precede it by another line of display to check that we affected the outcome. We'll want to add the following two lines just after the <code> do </code>, before the first two instructions of the routine:
|
The Editing Tool hosts a text editor which you can use to change the class text. Here the routine <code>display</code> starts by outputting a simple message; let's precede it by another line of display to check that we affected the outcome. We'll want to add the following two lines just after the <code>do</code>, before the first two instructions of the routine:
|
||||||
<code>
|
<code>
|
||||||
io.put_string ("This is some more added text")
|
io.put_string ("This is some more added text")
|
||||||
io.new_line
|
io.new_line
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
They are very similar to the current first two lines of the routine, so you can just use copy-paste: select the first two lines with the mouse, copy them using CTRL- <code> C </code> (or <code> Copy </code> from the <code> Edit </code> menu), then paste them just after the <code> do </code> using CTRL- <code> V </code> (or <code> Paste </code> from the <code> Edit </code> menu). Add or remove tabs to align with the rest of the routine, and change the string to <code> THIS IS SOME MORE ADDED TEXT </code> so that the result will look like what's shown on the next figure. This is all there is to change; the second line remains untouched. Please check the result and be careful not to introduce any mistakes; in the next section we'll study how EiffelStudio will report syntax and other errors, but right now we want to see what happens when everything is right!
|
They are very similar to the current first two lines of the routine, so you can just use copy-paste: select the first two lines with the mouse, copy them using CTRL- <code>C</code> (or <code>Copy</code> from the <code>Edit</code> menu), then paste them just after the <code>do</code> using CTRL- <code>V</code> (or <code>Paste</code> from the <code>Edit</code> menu). Add or remove tabs to align with the rest of the routine, and change the string to <code>THIS IS SOME MORE ADDED TEXT</code> so that the result will look like what's shown on the next figure. This is all there is to change; the second line remains untouched. Please check the result and be careful not to introduce any mistakes; in the next section we'll study how EiffelStudio will report syntax and other errors, but right now we want to see what happens when everything is right!
|
||||||
|
|
||||||
[[Image:index-67]]
|
[[Image:index-67]]
|
||||||
|
|
||||||
Now save your changes; you may indifferently use CTRL- <code> S </code>, the <code> Save </code> entry from the <code> Edit </code> menu, or the Save button highlighted on the figure. (If you forget to save, the next compilation will tell you so, and ask you if from now on you want all non-saved class edits to be saved automatically.)
|
Now save your changes; you may indifferently use CTRL- <code>S</code>, the <code>Save</code> entry from the <code>Edit</code> menu, or the Save button highlighted on the figure. (If you forget to save, the next compilation will tell you so, and ask you if from now on you want all non-saved class edits to be saved automatically.)
|
||||||
</div><div>
|
</div><div>
|
||||||
==Recompiling and executing after a change==
|
==Recompiling and executing after a change==
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ Execute the system again now, using one of the execution buttons, with or withou
|
|||||||
|
|
||||||
In studying the Context Tool we discovered a number of views of a class text. For convenience, you can also display a number of these views in the Editing Tool, although only the basic Text view is editable. A row of buttons next to the Class and Feature fields lets you choose between them.
|
In studying the Context Tool we discovered a number of views of a class text. For convenience, you can also display a number of these views in the Editing Tool, although only the basic Text view is editable. A row of buttons next to the Class and Feature fields lets you choose between them.
|
||||||
|
|
||||||
You can try some of these view now, although there is nothing exciting to show about class <code> PARENT </code>. Make sure to come back to the <code> Text </code> view -- through the leftmost of these buttons -- so that we can continue exploring the editing facilities.
|
You can try some of these view now, although there is nothing exciting to show about class <code>PARENT</code>. Make sure to come back to the <code>Text</code> view -- through the leftmost of these buttons -- so that we can continue exploring the editing facilities.
|
||||||
</div><div>
|
</div><div>
|
||||||
==Basic editing facilities==
|
==Basic editing facilities==
|
||||||
|
|
||||||
@@ -46,27 +46,27 @@ The editing facilities in the Editing Tool are provided by the EiffelStudio Edit
|
|||||||
|
|
||||||
The online documentation provides many more details about editing functions. Here are the essentials.
|
The online documentation provides many more details about editing functions. Here are the essentials.
|
||||||
|
|
||||||
First, the key property of any interactive system: '''Undo'''. You can cancel the latest editing command, or any earlier one performed during the current session, by choosing <code> Undo </code> from the <code> Edit </code> menu, or typing CTRL- <code> Z </code>. To cancel more than one command, apply Undo repetitively; there is no limit to the number of undoable commands within a session. (When you exit EiffelStudio, however, the editing history is lost.) To redo an undone command, use <code> Redo </code> from the <code> Edit </code> menu or CTRL- <code> Y </code>.
|
First, the key property of any interactive system: '''Undo'''. You can cancel the latest editing command, or any earlier one performed during the current session, by choosing <code>Undo</code> from the <code>Edit</code> menu, or typing CTRL- <code>Z</code>. To cancel more than one command, apply Undo repetitively; there is no limit to the number of undoable commands within a session. (When you exit EiffelStudio, however, the editing history is lost.) To redo an undone command, use <code>Redo</code> from the <code>Edit</code> menu or CTRL- <code>Y</code>.
|
||||||
|
|
||||||
{{note|Since right now we don't need to do any actual editing to continue this Guided Tour, we suggest that you don't change the text of class <code> PARENT </code> but simply look up the menu entries described next, without actually selecting them. If you do make a change, voluntary or not, you should at the end of this editor discussion perform enough Undo commands to get the text of class <code> PARENT </code> back to its original state. }}
|
{{note|Since right now we don't need to do any actual editing to continue this Guided Tour, we suggest that you don't change the text of class <code>PARENT</code> but simply look up the menu entries described next, without actually selecting them. If you do make a change, voluntary or not, you should at the end of this editor discussion perform enough Undo commands to get the text of class <code>PARENT</code> back to its original state. }}
|
||||||
|
|
||||||
To '''copy''', '''cut''' and '''paste''' use the corresponding entries in the <code> Edit </code> menu or the familiar keyboard shortcuts CTRL- <code> C </code>, CTRL- <code> X </code> and CTRL- <code> V </code>.
|
To '''copy''', '''cut''' and '''paste''' use the corresponding entries in the <code>Edit</code> menu or the familiar keyboard shortcuts CTRL- <code>C</code>, CTRL- <code>X</code> and CTRL- <code>V</code>.
|
||||||
|
|
||||||
When you edit text, it will be automatically '''indented''' according to standard Eiffel style rules. If you prefer to remain in charge of your own indenting, you can disable this facility through <code> Tools </code> <code> --> </code> <code> Preferences </code> <code> --> </code> <code> Editor </code>.
|
When you edit text, it will be automatically '''indented''' according to standard Eiffel style rules. If you prefer to remain in charge of your own indenting, you can disable this facility through <code>Tools</code> <code>--></code> <code>Preferences</code> <code>--></code> <code>Editor</code>.
|
||||||
|
|
||||||
To indent a sequence of lines, select the lines, then use <code> Edit </code> <code> --> </code> <code> Advanced </code> <code> --> </code> <code> Indent selection </code>. You can also use the Tab key, but only if the selection consists of one or more entire lines; otherwise typing Tab will simply replace the selected text with a Tab character. Shift-Tab will similarly decrease indentation by one step.
|
To indent a sequence of lines, select the lines, then use <code>Edit</code> <code>--></code> <code>Advanced</code> <code>--></code> <code>Indent selection</code>. You can also use the Tab key, but only if the selection consists of one or more entire lines; otherwise typing Tab will simply replace the selected text with a Tab character. Shift-Tab will similarly decrease indentation by one step.
|
||||||
|
|
||||||
To '''comment out''' a sequence of lines, select them and use <code> Edit </code> <code> --> </code> <code> Advanced </code> <code> --> </code> <code> Comment </code> or CTRL- <code> K </code>. Conversely, CTRL-Shift- <code> K </code> will uncomment. Also in the <code> Edit </code> <code> --> </code> <code> Advanced </code> menu are "set to upper case", with the keyboard shortcut CTRL- <code> U </code>, and to lower case, CTRL-Shift- <code> U </code>.
|
To '''comment out''' a sequence of lines, select them and use <code>Edit</code> <code>--></code> <code>Advanced</code> <code>--></code> <code>Comment</code> or CTRL- <code>K</code>. Conversely, CTRL-Shift- <code>K</code> will uncomment. Also in the <code>Edit</code> <code>--></code> <code>Advanced</code> menu are "set to upper case", with the keyboard shortcut CTRL- <code>U</code>, and to lower case, CTRL-Shift- <code>U</code>.
|
||||||
|
|
||||||
Other useful facilities of the <code> Edit </code> <code> --> </code> <code> Advanced </code> menu are:
|
Other useful facilities of the <code>Edit</code> <code>--></code> <code>Advanced</code> menu are:
|
||||||
* <code> Embed in "if" </code>, or CTRL- <code> I </code>, which will create a conditional instruction and include the selected instructions in it.
|
* <code>Embed in "if"</code>, or CTRL- <code>I</code>, which will create a conditional instruction and include the selected instructions in it.
|
||||||
* <code> Embed in "debug" </code>, CTRL- <code> D </code>, which will include the selected instructions in a <code> debug </code> <span>...</span> <code> end </code> instruction, so that their execution becomes conditional on a Debug compilation option.
|
* <code>Embed in "debug"</code>, CTRL- <code>D</code>, which will include the selected instructions in a <code>debug</code> <span>...</span> <code>end</code> instruction, so that their execution becomes conditional on a Debug compilation option.
|
||||||
<div>
|
<div>
|
||||||
==Search and replace==
|
==Search and replace==
|
||||||
|
|
||||||
The editor lets you search for text and replace occurrences, individually or globally. We assume you have seen a text search facility before, so we'll just emphasize some of the less obvious features.
|
The editor lets you search for text and replace occurrences, individually or globally. We assume you have seen a text search facility before, so we'll just emphasize some of the less obvious features.
|
||||||
|
|
||||||
To start a search, make sure the Search Tool is active by clicking the Search button in the top toolbar (this one we'll let you find) or using the <code> Edit </code> <code> --> </code> <code> Find </code> menu entry.
|
To start a search, make sure the Search Tool is active by clicking the Search button in the top toolbar (this one we'll let you find) or using the <code>Edit</code> <code>--></code> <code>Find</code> menu entry.
|
||||||
|
|
||||||
{{note|that although we are studying Search as part of the Editor, this function also applies to any textual form displayed in the Context Tool; make sure to start a Search from the tool that you want to search.'' }}
|
{{note|that although we are studying Search as part of the Editor, this function also applies to any textual form displayed in the Context Tool; make sure to start a Search from the tool that you want to search.'' }}
|
||||||
|
|
||||||
@@ -76,29 +76,29 @@ The Search Tool presents a number of self-explanatory options:
|
|||||||
|
|
||||||
[[Image:index-69]]
|
[[Image:index-69]]
|
||||||
|
|
||||||
You can enter a term to replace your search term in the <code> Replace with </code> box.
|
You can enter a term to replace your search term in the <code>Replace with</code> box.
|
||||||
|
|
||||||
Having filled the two fields, you can elect to replace the last found occurrence, or all occurrences at once.
|
Having filled the two fields, you can elect to replace the last found occurrence, or all occurrences at once.
|
||||||
|
|
||||||
The <code> Search for </code> field has an associated drop-down list, so that you can reuse a recently entered search string without retyping it.
|
The <code>Search for</code> field has an associated drop-down list, so that you can reuse a recently entered search string without retyping it.
|
||||||
</div><div>
|
</div><div>
|
||||||
==Let the editor do the typing==
|
==Let the editor do the typing==
|
||||||
|
|
||||||
Particularly interesting are the editor's '''automatic completion''' facilities. Well, particularly interesting for <span>most</span> people: maybe you like your editor to do the grunt work for you, or maybe you don't. In the latter case -- if you prefer to be in control of all the details -- don't worry: through <code> Tools </code> <code> --> </code> <code> Preferences </code> <code> --> </code> <code> Editor </code> you can easily disable any facility that you don't like. The behavior described here is the default.
|
Particularly interesting are the editor's '''automatic completion''' facilities. Well, particularly interesting for <span>most</span> people: maybe you like your editor to do the grunt work for you, or maybe you don't. In the latter case -- if you prefer to be in control of all the details -- don't worry: through <code>Tools</code> <code>--></code> <code>Preferences</code> <code>--></code> <code>Editor</code> you can easily disable any facility that you don't like. The behavior described here is the default.
|
||||||
|
|
||||||
The EiffelStudio Editor knows about Eiffel syntax and will recognize syntactic elements as you type them. It will color them according to standard conventions: basic elements in black, keywords in blue, comments in dark red. You can change these conventions through Preferences.
|
The EiffelStudio Editor knows about Eiffel syntax and will recognize syntactic elements as you type them. It will color them according to standard conventions: basic elements in black, keywords in blue, comments in dark red. You can change these conventions through Preferences.
|
||||||
|
|
||||||
If you start typing a control structure through its opening keyword, such as <code> if </code>, or <code> from </code> for a loop, the editor will automatically display the structure of the whole construct. Here for example is the result if you type the <code> from </code> followed by Return/Enter at the beginning of our example routine:
|
If you start typing a control structure through its opening keyword, such as <code>if</code>, or <code>from</code> for a loop, the editor will automatically display the structure of the whole construct. Here for example is the result if you type the <code>from</code> followed by Return/Enter at the beginning of our example routine:
|
||||||
|
|
||||||
[[Image:index-71]]
|
[[Image:index-71]]
|
||||||
|
|
||||||
This has produced the structure of an Eiffel loop: <code> from </code> <span>...</span> <code> until </code> <span>...</span> <code> loop </code> <span>...</span> <code> end </code>. You can then fill in the blanks with the appropriate expression and instructions. The generated lines start with the appropriate number of Tab characters to support the standard Eiffel indenting conventions. If you want a more compact style, follow the <code> from </code> with a space rather than Return. Typing <code> if </code> followed by Return or a space will similarly produce the outline of a conditional instruction.
|
This has produced the structure of an Eiffel loop: <code>from</code> <span>...</span> <code>until</code> <span>...</span> <code>loop</code> <span>...</span> <code>end</code>. You can then fill in the blanks with the appropriate expression and instructions. The generated lines start with the appropriate number of Tab characters to support the standard Eiffel indenting conventions. If you want a more compact style, follow the <code>from</code> with a space rather than Return. Typing <code>if</code> followed by Return or a space will similarly produce the outline of a conditional instruction.
|
||||||
|
|
||||||
To start a routine, type the routine name followed by the keyword <code> is </code> and a Return. The editor generates the basic structure of a routine text:
|
To start a routine, type the routine name followed by the keyword <code>is</code> and a Return. The editor generates the basic structure of a routine text:
|
||||||
|
|
||||||
[[Image:index-72]]
|
[[Image:index-72]]
|
||||||
|
|
||||||
This prompts you to enter the header comment (no self-respecting Eiffel developer even <span>thinks</span> of writing a feature without a header comment). At the end of the header comment, type Return if the header comment continues, otherwise type a down arrow to continue with the indentation for the beginning of the routine, with one of the keywords <code> require </code>, <code> local </code>, <code> do </code>, <code> external </code>, <code> once </code>. Once you type <code> do </code>, followed by a Return or space, the completion mechanism will insert the appropriate <code> end </code>, but other than that it doesn't try to produce an entire routine structure because there are too many syntactical choices (precondition or not, postcondition or not, locals or not etc.).
|
This prompts you to enter the header comment (no self-respecting Eiffel developer even <span>thinks</span> of writing a feature without a header comment). At the end of the header comment, type Return if the header comment continues, otherwise type a down arrow to continue with the indentation for the beginning of the routine, with one of the keywords <code>require</code>, <code>local</code>, <code>do</code>, <code>external</code>, <code>once</code>. Once you type <code>do</code>, followed by a Return or space, the completion mechanism will insert the appropriate <code>end</code>, but other than that it doesn't try to produce an entire routine structure because there are too many syntactical choices (precondition or not, postcondition or not, locals or not etc.).
|
||||||
|
|
||||||
Also interesting is '''feature completion''', using the '''CTRL-SPACE''' key. It works at two levels:
|
Also interesting is '''feature completion''', using the '''CTRL-SPACE''' key. It works at two levels:
|
||||||
* You can type the beginning of the name of a feature of the current class, then CTRL-SPACE to get possible completions.
|
* You can type the beginning of the name of a feature of the current class, then CTRL-SPACE to get possible completions.
|
||||||
@@ -106,7 +106,7 @@ Also interesting is '''feature completion''', using the '''CTRL-SPACE''' key. It
|
|||||||
|
|
||||||
In both cases, if more than one completion is possible, you will get a menu of the possibilities. You can scroll through it with the up and down arrow keys, or the mouse, and select one through Enter or double-click. You can also or give up through the Escape key.
|
In both cases, if more than one completion is possible, you will get a menu of the possibilities. You can scroll through it with the up and down arrow keys, or the mouse, and select one through Enter or double-click. You can also or give up through the Escape key.
|
||||||
|
|
||||||
Here for example is the menu you will see in the body of our example routine if you type <code> io </code> <span>. </span> followed by CTRL-SPACE, where <code> io </code> is the feature, coming from class <code> ANY </code>, that provides access to standard input and output facilities:
|
Here for example is the menu you will see in the body of our example routine if you type <code>io</code> <span>. </span> followed by CTRL-SPACE, where <code>io</code> is the feature, coming from class <code>ANY</code>, that provides access to standard input and output facilities:
|
||||||
|
|
||||||
[[Image:index-73]]
|
[[Image:index-73]]
|
||||||
|
|
||||||
@@ -118,21 +118,21 @@ The following properties enhance the convenience of the completion mechanisms:
|
|||||||
The combination of these facilities means that you can often obtain what you want simply by typing CTRL-SPACE repeatedly.
|
The combination of these facilities means that you can often obtain what you want simply by typing CTRL-SPACE repeatedly.
|
||||||
|
|
||||||
Also note the following properties of automatic feature completion:
|
Also note the following properties of automatic feature completion:
|
||||||
* The mechanism will only work for queries that were present at the time of the last successful compilation. So if you add an attribute, say <code> attr </code>, to the current class, and do not recompile, typing <code> a </code> -CTRL-SPACE will not display <code> attr </code>. To make sure that it's included in completion proposals, save and recompile. (Remember, incremental compilation is fast in EiffelStudio, so there is nothing wrong in compiling early and often.) The same rule holds for features of <span>other</span> classes, those that will appear in proposed completions after a period.
|
* The mechanism will only work for queries that were present at the time of the last successful compilation. So if you add an attribute, say <code>attr</code>, to the current class, and do not recompile, typing <code>a</code> -CTRL-SPACE will not display <code>attr</code>. To make sure that it's included in completion proposals, save and recompile. (Remember, incremental compilation is fast in EiffelStudio, so there is nothing wrong in compiling early and often.) The same rule holds for features of <span>other</span> classes, those that will appear in proposed completions after a period.
|
||||||
* Automatic completion is applicable to features, not local entities or formal arguments.
|
* Automatic completion is applicable to features, not local entities or formal arguments.
|
||||||
* The features proposed for automatic completion include all features of the class: those declared in the class itself, or <span>immediate</span> features, and those <span>inherited</span> from proper ancestors, direct or indirect, with one exception: by default the list will not include features from the universal class <code> ANY </code>, which serves as ancestor to all classes and provides many features for comparison, copying, input-output, reflection etc. Including <code> ANY's </code> features would clutter all menus with too many features. So for example typing <code> i </code> followed by CTRL-SPACE will not suggest <code> io </code> among the possible completions. You can change this policy through Preferences. The policy does not apply to remote feature completion for an entity <code> x </code> declared of type <code> ANY </code> : typing CTRL-SPACE after <code> x </code> <span>. </span> will produce the list of <code> ANY </code> 's features.
|
* The features proposed for automatic completion include all features of the class: those declared in the class itself, or <span>immediate</span> features, and those <span>inherited</span> from proper ancestors, direct or indirect, with one exception: by default the list will not include features from the universal class <code>ANY</code>, which serves as ancestor to all classes and provides many features for comparison, copying, input-output, reflection etc. Including <code>ANY's</code> features would clutter all menus with too many features. So for example typing <code>i</code> followed by CTRL-SPACE will not suggest <code>io</code> among the possible completions. You can change this policy through Preferences. The policy does not apply to remote feature completion for an entity <code>x</code> declared of type <code>ANY</code> : typing CTRL-SPACE after <code>x</code> <span>. </span> will produce the list of <code>ANY</code> 's features.
|
||||||
|
|
||||||
==Using your own editor==
|
==Using your own editor==
|
||||||
|
|
||||||
You may have a favorite editor and prefer to use it, at least in some cases. The EiffelStudio incremental compilation mechanism, to be studied shortly, recognizes that files have been modified outside of EiffelStudio (by checking their time stamps) and will without any fuss take their modified versions into account.
|
You may have a favorite editor and prefer to use it, at least in some cases. The EiffelStudio incremental compilation mechanism, to be studied shortly, recognizes that files have been modified outside of EiffelStudio (by checking their time stamps) and will without any fuss take their modified versions into account.
|
||||||
|
|
||||||
You can also call an outside editor on a class from within EiffelStudio. Just use <code> File </code> <code> --> </code> <code> External editor </code> or the corresponding button in the top toolbar.
|
You can also call an outside editor on a class from within EiffelStudio. Just use <code>File</code> <code>--></code> <code>External editor</code> or the corresponding button in the top toolbar.
|
||||||
|
|
||||||
This will call the editor of your choice. The default is Notepad on Windows and Vi on Unix and Linux. You can easily change this to any editor by entering the desired editor command in <code> Tools </code> <code> --> </code> <code> Preferences </code> <code> --> </code> <code> Global Preferences </code>. In this command text you can use the two special notations <code> $target </code> and <code> $line </code> ; when EiffelStudio calls the selected command, it will replace any occurrence of <code> $target </code> by the name of the file where the current class resides, and <code> $line </code> by the line number at which the Editing Tool is currently scrolled. If you include one or both of these markers at the appropriate argument positions for the command, this will enable you -- assuming the editor supports the appropriate options -- to make sure it starts at exactly the right place. For example the default editor command under Unix is
|
This will call the editor of your choice. The default is Notepad on Windows and Vi on Unix and Linux. You can easily change this to any editor by entering the desired editor command in <code>Tools</code> <code>--></code> <code>Preferences</code> <code>--></code> <code>Global Preferences</code>. In this command text you can use the two special notations <code>$target</code> and <code>$line</code> ; when EiffelStudio calls the selected command, it will replace any occurrence of <code>$target</code> by the name of the file where the current class resides, and <code>$line</code> by the line number at which the Editing Tool is currently scrolled. If you include one or both of these markers at the appropriate argument positions for the command, this will enable you -- assuming the editor supports the appropriate options -- to make sure it starts at exactly the right place. For example the default editor command under Unix is
|
||||||
<code>
|
<code>
|
||||||
vi +$line $target</code>
|
vi +$line $target</code>
|
||||||
|
|
||||||
meaning: start the Vi editor on the <code> $target </code> file, initially positioned at line <code> $line </code> (the <code> + </code> <code> line_number </code> command-line option of Vi directs it to start at line <code> line_number </code> ).
|
meaning: start the Vi editor on the <code>$target</code> file, initially positioned at line <code>$line</code> (the <code>+</code> <code>line_number</code> command-line option of Vi directs it to start at line <code>line_number</code> ).
|
||||||
|
|
||||||
If you start an external editor on a class, then exit the editor after possibly making changes, EiffelStudio will immediately update the class text in the Editing Tool. More generally, note that EiffelStudio will detect changes made separately on the same class, and warn you of possible conflicts.
|
If you start an external editor on a class, then exit the editor after possibly making changes, EiffelStudio will immediately update the class text in the Editing Tool. More generally, note that EiffelStudio will detect changes made separately on the same class, and warn you of possible conflicts.
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ You now know quite a few ways of re-targeting a Development Window to a "develop
|
|||||||
<div>
|
<div>
|
||||||
==Trying Pick-and-Drop==
|
==Trying Pick-and-Drop==
|
||||||
|
|
||||||
We restart from the last state, with a Development Window target to feature <code> forth </code> of class <code> LIST </code>. The next figure shows the whole window; it should be exactly what you see as a result of the last operations. We'll use the <code> Ancestor versions </code> view of the <code> Feature </code>Tab.
|
We restart from the last state, with a Development Window target to feature <code>forth</code> of class <code>LIST</code>. The next figure shows the whole window; it should be exactly what you see as a result of the last operations. We'll use the <code>Ancestor versions</code> view of the <code lang=text>Feature </code>Tab.
|
||||||
|
|
||||||
If for some reason the window doesn't look like the next figure, it's easy to reconstruct it: make sure both the Cluster tree and the Feature tree are visible (if not, click the corresponding buttons as detailed [[7 CLASS VIEWS|here]] ); target the tool to class <code> LIST </code> ; target further to its feature <code> forth </code> by clicking that feature name in the Feature tree; make sure both the top-right Editing Tool and the bottom-right Context Tool are visible; in the Context Tool, select the <code> Feature </code> Tab and its <code> Descendant versions </code>format.
|
If for some reason the window doesn't look like the next figure, it's easy to reconstruct it: make sure both the Cluster tree and the Feature tree are visible (if not, click the corresponding buttons as detailed [[7 CLASS VIEWS|here]] ); target the tool to class <code>LIST</code> ; target further to its feature <code>forth</code> by clicking that feature name in the Feature tree; make sure both the top-right Editing Tool and the bottom-right Context Tool are visible; in the Context Tool, select the <code lang=text>Feature</code> Tab and its <code>Descendant versions </code>format.
|
||||||
|
|
||||||
[[Image:index-60]]
|
[[Image:index-60]]
|
||||||
|
|
||||||
@@ -17,22 +17,23 @@ In the Context Tool near the bottom right, there is an entry that reads
|
|||||||
ARRAYED_CIRCULAR forth
|
ARRAYED_CIRCULAR forth
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
referring to the version of feature <code> forth </code> in class <code> ARRAYED_CIRCULAR </code>. Let's assume you want to see what that version actually is. It suffices to retarget the tool to it. Of course you could type or copy-paste the class name <code> ARRAYED_CIRCULAR </code> in the Class field at the top of the window, and the feature name <code> forth </code> in the adjacent Feature field. But this is too much work; after all, you have just seen a reference to the feature, through its name as it appears in the Descendant version format, so it's natural to use it directly from the graphical interface.
|
referring to the version of feature <code>forth</code> in class <code>ARRAYED_CIRCULAR</code>. Let's assume you want to see what that version actually is. It suffices to retarget the tool to it. Of course you could type or copy-paste the class name <code>ARRAYED_CIRCULAR</code> in the Class field at the top of the window, and the feature name <code>forth</code> in the adjacent Feature field. But this is too much work; after all, you have just seen a reference to the feature, through its name as it appears in the Descendant version format, so it's natural to use it directly from the graphical interface.
|
||||||
|
|
||||||
As we've seen before, you could control-right-click on the feature name at the place where it appears; this would create a new Development Window targeted to <code> forth </code> from <code> ARRAYED_CIRCULAR </code>. But you don't necessarily want a new window. Instead you can use Pick-and-Drop to retarget the current window.
|
As we've seen before, you could control-right-click on the feature name at the place where it appears; this would create a new Development Window targeted to <code>forth</code> from <code>ARRAYED_CIRCULAR</code>. But you don't necessarily want a new window. Instead you can use Pick-and-Drop to retarget the current window.
|
||||||
|
|
||||||
Here is how it works. Position the cursor on the desired feature reference: the word <code> forth </code> in the line <code> forth ARRAYED_CIRCULAR </code>. Right-click, that is to say click the rightmost mouse button, and '''release the button immediately'''. That's right: you use a simple click, and do '''not''' maintain the button down.
|
Here is how it works. Position the cursor on the desired feature reference: the word <code>forth</code> in the line <code>forth ARRAYED_CIRCULAR</code>. Right-click, that is to say click the rightmost mouse button, and '''release the button immediately'''. That's right: you use a simple click, and do '''not''' maintain the button down.
|
||||||
|
|
||||||
Now move the mouse a trifle, <span>without pressing any button</span> :
|
Now move the mouse a trifle, <span>without pressing any button</span> :
|
||||||
<div> [[Image:index-61]] </div>
|
<div> [[Image:index-61]] </div>
|
||||||
The cursor has changed into a new shape, a cross representing the type of development object that you have picked, a feature. For a class, as you may have guessed, it would be a small ellipse ("bubble"). Each kind of development object that you may create and manipulate during your work with EiffelStudio has its distinctive icon.
|
The cursor has changed into a new shape, a cross representing the type of development object that you have picked, a feature. For a class, as you may have guessed, it would be a small ellipse ("bubble"). Each kind of development object that you may create and manipulate during your work with EiffelStudio has its distinctive icon.
|
||||||
|
|
||||||
The display reflects that you have " <span>picked</span> " the feature <code> forth </code>. Now you can <span>drop</span> it at any appropriate place to retarget the corresponding tool. In fact you can drop it right where it is, in the Context Tool of the current Development tool. To drop, just '''right-click''' again. (That is to say, as before, press the rightmost mouse button and release it immediately.) This achieves a "drop", and retargets the Development Window to the chosen feature, <code> forth </code> from <code> ARRAYED_CIRCULAR </code>. The retargeting affects both the Editing Tool and the Context Tool (assuming the Link Content View option is selected on the toolbar, see below "Isolating the context" for more information), which keeps its current view ( <code> Descendant versions </code> in the <code> Feature </code> Tab). We'll see shortly how to give them separate targets if that's preferred.
|
The display reflects that you have " <span>picked</span> " the feature <code>forth</code>. Now you can <span>drop</span> it at any appropriate place to retarget the corresponding tool. In fact you can drop it right where it is, in the Context Tool of the current Development tool. To drop, just '''right-click''' again. (That is to say, as before, press the rightmost mouse button and release it immediately.) This achieves a "drop", and retargets the Development Window to the chosen feature, <code>forth</code> from <code>ARRAYED_CIRCULAR</code>. The retargeting affects both the Editing Tool and the Context Tool (assuming the Link Content View option is selected on the toolbar, see below "Isolating the context" for more information), which keeps its current view ( <code>Descendant versions</code> in the <code lang=text>Feature</code> Tab). We'll see shortly how to give them separate targets if that's preferred.
|
||||||
|
|
||||||
[[Image:index-62]]
|
[[Image:index-62]]
|
||||||
|
|
||||||
==How Pick-and-Drop works==
|
==How Pick-and-Drop works==
|
||||||
|
|
||||||
|
|
||||||
The Pick-and-Drop mechanism is very simple. It consists of three steps:
|
The Pick-and-Drop mechanism is very simple. It consists of three steps:
|
||||||
* '''Pick''' step: find the development object you want to pick, right-click it, release the mouse button.
|
* '''Pick''' step: find the development object you want to pick, right-click it, release the mouse button.
|
||||||
* '''Move''' step: move the mouse to the desired drop point, <span>without pressing any button</span>.
|
* '''Move''' step: move the mouse to the desired drop point, <span>without pressing any button</span>.
|
||||||
@@ -48,9 +49,9 @@ The Pick-and-Drop mechanism relies on the metaphor of '''pebbles and holes'''. W
|
|||||||
|
|
||||||
In the same way that Eiffel is a typed object-oriented language, the Pick-and-Drop mechanism is typed: you can only drop a pebble into a compatible hole. For example you may drop a class pebble into a Development Window, to retarget it to the chosen class.
|
In the same way that Eiffel is a typed object-oriented language, the Pick-and-Drop mechanism is typed: you can only drop a pebble into a compatible hole. For example you may drop a class pebble into a Development Window, to retarget it to the chosen class.
|
||||||
|
|
||||||
In Eiffel, type compatibility is not necessarily type identity, but is governed by <span>conformance</span>, based on inheritance and polymorphism: to an entity of type <code> POLYGON </code>, you may assign not only an expression of that same type, but also one of type <code> RECTANGLE </code>, if class <code> RECTANGLE </code> inherits from -- conforms to -- class <code> POLYGON </code>. Similarly, EiffelStudio considers that the development type "feature" conforms to "class"; this means you may drop a feature into a Development Window targeted to a class; this will retarget the tool to the feature's class and the feature itself, with the text of the class scrolled to the position of the feature.
|
In Eiffel, type compatibility is not necessarily type identity, but is governed by <span>conformance</span>, based on inheritance and polymorphism: to an entity of type <code>POLYGON</code>, you may assign not only an expression of that same type, but also one of type <code>RECTANGLE</code>, if class <code>RECTANGLE</code> inherits from -- conforms to -- class <code>POLYGON</code>. Similarly, EiffelStudio considers that the development type "feature" conforms to "class"; this means you may drop a feature into a Development Window targeted to a class; this will retarget the tool to the feature's class and the feature itself, with the text of the class scrolled to the position of the feature.
|
||||||
|
|
||||||
In the Pick-and-Drop example -- for <code> forth </code> of <code> ARRAYED_CIRCULAR </code> -- you did not have to go to a new target: the current window was a valid drop target, so you just dropped right away. In such a case you don't even have to move the mouse; Pick-and-Drop is just a matter of two right-clicks.
|
In the Pick-and-Drop example -- for <code>forth</code> of <code>ARRAYED_CIRCULAR</code> -- you did not have to go to a new target: the current window was a valid drop target, so you just dropped right away. In such a case you don't even have to move the mouse; Pick-and-Drop is just a matter of two right-clicks.
|
||||||
|
|
||||||
This is similar to a '''double-click''', a commonly used interaction technique, but without the stress of the usual double-click, which requires you to wait no more than a specified time -- typically half a second or so -- between the two clicks. With Pick-and-Drop the effect is the same whether the second click follows the first after one tenth of a second or two days.
|
This is similar to a '''double-click''', a commonly used interaction technique, but without the stress of the usual double-click, which requires you to wait no more than a specified time -- typically half a second or so -- between the two clicks. With Pick-and-Drop the effect is the same whether the second click follows the first after one tenth of a second or two days.
|
||||||
</div><div>
|
</div><div>
|
||||||
@@ -60,7 +61,7 @@ In the previous example we pick-and-dropped a feature to its own tool. You can a
|
|||||||
|
|
||||||
Try this now. Bring up a new Development Window by choosing the menu entry
|
Try this now. Bring up a new Development Window by choosing the menu entry
|
||||||
<code lang="text">
|
<code lang="text">
|
||||||
File --> New window </code>
|
File --> New window</code>
|
||||||
|
|
||||||
(unless you already have a second Development Window open, in which case you can simply reuse it). Make sure the two Development Window do not overlap too much, so that you can see enough of each. In the first Development Window, pick a class (right-click it). Move the mouse to the Editing Tool of the second Development Tool. Drop the class by right-clicking again. The tool retargets itself to the chosen class.
|
(unless you already have a second Development Window open, in which case you can simply reuse it). Make sure the two Development Window do not overlap too much, so that you can see enough of each. In the first Development Window, pick a class (right-click it). Move the mouse to the Editing Tool of the second Development Tool. Drop the class by right-clicking again. The tool retargets itself to the chosen class.
|
||||||
|
|
||||||
@@ -103,25 +104,28 @@ To change the behavior, choose the menu entry
|
|||||||
<code lang="text">
|
<code lang="text">
|
||||||
View --> Link context tool</code>
|
View --> Link context tool</code>
|
||||||
|
|
||||||
After this, the entry will change to <code> View </code> <code> --> </code> <code> Unlink context tool </code>, so that you can later revert to isolated behavior. Under isolation behavior, try pick-and-dropping a class or feature into the top Editing Tool; then pick-and-drop a class or feature into the bottom Context Tool. You will notice that each of these operations retargets the affected tool, but not the other.
|
After this, the entry will change to
|
||||||
|
<code lang=text>
|
||||||
|
View --> Unlink context tool</code>
|
||||||
|
so that you can later revert to isolated behavior. Under isolation behavior, try pick-and-dropping a class or feature into the top Editing Tool; then pick-and-drop a class or feature into the bottom Context Tool. You will notice that each of these operations retargets the affected tool, but not the other.
|
||||||
</div><div>
|
</div><div>
|
||||||
==Customizing the view==
|
==Customizing the view==
|
||||||
|
|
||||||
If you will often alternate between the linked and isolated behaviors, you can use the <code> Link/Isolate </code> button of the top toolbar. This button is <span>not</span> present by default on the toolbar, so this is a good opportunity to take a quick look at the user interface customization mechanism, which you can use later to tailor the interface to the exact form you need. Select
|
If you will often alternate between the linked and isolated behaviors, you can use the <code>Link/Isolate</code> button of the top toolbar. This button is <span>not</span> present by default on the toolbar, so this is a good opportunity to take a quick look at the user interface customization mechanism, which you can use later to tailor the interface to the exact form you need. Select
|
||||||
<code lang="text">
|
<code lang="text">
|
||||||
View --> Toolbars --> Customize standard toolbar</code>
|
View --> Toolbars --> Customize standard toolbar</code>
|
||||||
|
|
||||||
(The adjacent entry is <code> toolbar project Customize </code> which provides complementary capabilities under a similar form.) You see a list of available buttons:
|
(The adjacent entry is <code>toolbar project Customize</code> which provides complementary capabilities under a similar form.) You see a list of available buttons:
|
||||||
|
|
||||||
[[Image:index-63]]
|
[[Image:index-63]]
|
||||||
|
|
||||||
The icons in the list on the right are currently displayed in the toolbar, but not those on the left. Among the latter you see (fourth from the bottom on the left-side list) <code lang="text"> Link or not the context tool to other components </code>. Select it by clicking; this makes the <code> -> Add </code> button active. Click this button to move the Link/Isolate icon to the list of displayed icons. It becomes the first item of the list, which is fine for the moment. (Later on you can change the order of buttons in the toolbar if you like, by using the <code> Up </code> and <code> Down </code> buttons.) Click <code> OK </code>. The toolbar of your development tool has a new button which you can now use to switch, for the enclosing Development Window, between the isolated and linked behaviors of the Context Tool.
|
The icons in the list on the right are currently displayed in the toolbar, but not those on the left. Among the latter you see (fourth from the bottom on the left-side list) <code lang="text">Link or not the context tool to other components</code>. Select it by clicking; this makes the <code>->Add</code> button active. Click this button to move the Link/Isolate icon to the list of displayed icons. It becomes the first item of the list, which is fine for the moment. (Later on you can change the order of buttons in the toolbar if you like, by using the <code>Up</code> and <code>Down</code> buttons.) Click <code>OK</code>. The toolbar of your development tool has a new button which you can now use to switch, for the enclosing Development Window, between the isolated and linked behaviors of the Context Tool.
|
||||||
</div>
|
</div>
|
||||||
==Context memory==
|
==Context memory==
|
||||||
|
|
||||||
If you start repeatedly retargeting the Context Tool -- especially under "isolated" behavior -- you will notice the following properties:
|
If you start repeatedly retargeting the Context Tool -- especially under "isolated" behavior -- you will notice the following properties:
|
||||||
* In most cases, pick-and-dropping a <span>class</span> to the Context switches the view to the <code> Class </code> Tab, and pick-and-dropping a <span>feature</span> switches to the <code> Feature </code> Tab.
|
* In most cases, pick-and-dropping a <span>class</span> to the Context switches the view to the <code lang=text>Class</code> Tab, and pick-and-dropping a <span>feature</span> switches to the <code lang=text>Feature</code> Tab.
|
||||||
* The view displayed in each case -- for example <code> Ancestors </code> for the <code> Class </code> Tab and <code> Flat </code> for the <code> Feature </code> Tab -- is default view for the corresponding Tab.
|
* The view displayed in each case -- for example <code>Ancestors</code> for the <code lang=text>Class</code> Tab and <code>Flat</code> for the <code lang=text>Feature</code> Tab -- is default view for the corresponding Tab.
|
||||||
|
|
||||||
==The many paths to retargeting==
|
==The many paths to retargeting==
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user