Drag-and-drop is used by the Visual Eiffel environment in all possible situations. It works very simply and can be applied to anything that looks like a class name: just mark the name, press the left mouse button, move the cursor to the proper place and release the button. In some situations, the marked name will move on the screen. Don't worry about this - just finish drag & drop and the name will return to its old position. In the picture below we selected three words - ANY in the editing area, ARGUMENTS in the navigation area and COMPARABLE in the viewer area.
As soon as a class name is highlighted it can be dragged to one of the other areas, where it will become the active class. Dragging into the editing area allows you to replace old windows with new contents (as long they have not been changed) and to open new windows. Switching between the graphical browser and textual editor can be done by selecting the appropriate menu item or toolbar icon.
Try moving ANY to another area of the editing area: You will see that the cursor changes its appearance. Whenever you see the opened hand, you can drop. Try moving ANY into the editing area (to a place which is not occupied). A new editor window will pop up. Try moving ANY into the viewer area. You will see the status indicator in the bottom line changing to ANY.
Next, activate the graphical browser.
Drag & drop COMPARABLE from the viewer area to the editing area. Show all descendants of COMPARABLE (as described) and you will get the picture below:
Now you can use the bubbles also for drag & drop. For this purpose, move the bubble you are interested in to the area where you want to have it. Don't worry if the picture changes.
As soon the bubble is dragged outside of the graphical browser window the picture will return to the state it had before you moved the bubble.
Only if you drag the bubble into the same window will the picture change.
We suggest that you deactivate the graphical browser now by pressing the "Drag To Editor" button.
Then activate an editor window (for example, drag a class name to the editor area). Now we will prepare a class name in order to use it with drag & drop.
For this purpose, double-click an identifier. The whole identifier will be highlighted. Now it is possible to delete - or to overwrite it. So, be careful! But it is also possible to drag & drop it outside of the editor window - as we have done it with the graphical browser.
We can do the same with any identifier - even if this identifier is not a class name. But the workbench will probably complain:
We suggest that you spend some time exploring drag & drop. Even in situations we did not describe here, drag & drop can be used - for example in the debugger. So, when you want something and you don't know how to do it, try drag & drop. It will probably help.