mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-03-22 17:51:15 +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,9 +6,9 @@ You now know quite a few ways of re-targeting a Development Window to a "develop
|
||||
<div>
|
||||
==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]]
|
||||
|
||||
@@ -17,22 +17,23 @@ In the Context Tool near the bottom right, there is an entry that reads
|
||||
ARRAYED_CIRCULAR forth
|
||||
</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> :
|
||||
<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 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]]
|
||||
|
||||
==How Pick-and-Drop works==
|
||||
|
||||
|
||||
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.
|
||||
* '''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 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.
|
||||
</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
|
||||
<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.
|
||||
|
||||
@@ -103,25 +104,28 @@ To change the behavior, choose the menu entry
|
||||
<code lang="text">
|
||||
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>
|
||||
==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">
|
||||
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]]
|
||||
|
||||
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>
|
||||
==Context memory==
|
||||
|
||||
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.
|
||||
* 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.
|
||||
* 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 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==
|
||||
|
||||
|
||||
Reference in New Issue
Block a user