3.3.2 Using the clipboard
You can use the clipboard to transfer data between tools, or even between the LispWorks IDE and other applications that you are running. There are three commands available, as follows:
Edit > Copy
to put the selected item or text from the active pane onto the clipboard.
Edit > Cut
to put the selected item or text from the active pane onto the clipboard and remove it from the active pane.
Edit > Paste
to replace the selected item or text in the active pane with the contents of the clipboard.
lets you transfer items between tools, or to different parts of the same tool.
Unlike the clipboard in many other applications, the LispWorks IDE clipboard can contain a Common Lisp object. This makes the LispWorks IDE clipboard an exceptionally powerful tool, allowing you to pass objects between different tools in the environment so that they can be examined in different ways.
If the clipboard contains a Lisp object and you use the
command on a pane that only accepts text, then the object's printed representation will be pasted.
There are several ways to use these commands:
In the Editor, you can
chunks of text and
them into different places, either within the same file or between different files. If you have sections of code which are very similar, rather than typing each section out explicitly, just
in the same section as many times as you need and change only the relevant parts. Cutting, copying and pasting using the kill ring describes a number of more sophisticated methods that can be used in the Editor.
In the Class Browser's
view (for example), you can
a selected class from the
pane to the clipboard and then
it into another tool. Because the Common Lisp object itself is copied to the clipboard, it is treated usefully according to the tool. For instance, if you paste it into an Inspector using
Edit > Object > Paste Object
, then the class is inspected. If you paste it into an editor however, the class name is simply pasted as text.
As well as the menu commands, you can use the
buttons in the toolbar, for
Note: You can also transfer data within the environment using the standard actions commands described in Performing operations on selected objects.
LispWorks IDE User Guide (Macintosh version) - 22 Dec 2009