IDL Workbench Tour

Figure 3-1: The IDL Workbench
The following sections discuss the components of the IDL Workbench.
Menu Bar
The menu bar, located at the top of the IDL Workbench window, allows you to control various Workbench features.
You can display menu commands for each menu using the following methods:
You can select or execute a menu command using the following methods:
- Clicking the item in the menu.
- Pressing Alt (Option on the Macintosh) plus the underlined letter in the menu's title, and then pressing the letter underlined in the menu item. For example, to select the menu item Edit → Undo in Windows, press Alt+E+U.
Note
Many menu items have alternate keyboard shortcuts. If a command has a keyboard shortcut, it is displayed to the right of the menu item.
Toolbar
The IDL Workbench toolbar buttons provide a shortcut to execute the most common tasks found in the main menu. When you position the mouse pointer over a toolbar button, a brief command description is displayed next to it (along with the keyboard shortcut, if applicable).
Views
Views are movable windows inside the IDL Workbench that display data, do analyses, and allow you to interact with the command line interpreter and compiled programs. For example, the Console view displays output from the command line and compiled programs.
Moving Views
A view might appear by itself or stacked with other views in a tabbed window. You can change the layout of a perspective by opening and closing views and by docking them in different positions in the Workbench window.
There are a number of options for moving views:
- You can move a view to another location by clicking on the view's tab and dragging it to another spot on the Workbench. You can move a view so that it occupies its own window, or you can move a view into a group of existing views (as a new tab).
- A view tab's context menu contains the Detached option, which allows you to detach the view into its own Workbench-independent window. The context menu's Move → View option lets you move a single view, and the Move → Tab Group option lets you move a group of views (as a collection of tabs).
Maximizing Views
You can maximize a view within the workbench interface by double-clicking on the view's tab. All other views are automatically minimized. Double-click on the view's tab again to restore it and all other views to the original size.
The following sections explain all the views that appear by default when you first run the IDL Workbench, but there are more views available. To display one of the other views, select it from the Window → Show View menu.
Tool Palette View
The Tool Palette is a graphical interface that allows you to quickly visualize data variables. This view is available only in the Visualize perspective. The Palette contains options for visualizing plot, image, surface, contour, map, and volume data. Simply drag a variable from the Variables view to create a visualization.

Figure 3-2: Tool Palette
For greater control over the visualization that is created, click the Action toggle in the Tool Palette menu bar do display the actions associated with each tool. Drag variables from the Variables view to the highlighted fields in the actions and click the button to create the visualization.
Project Explorer
The Project Explorer view provides a hierarchical view of the resources in the IDL Workbench. From here, you can open files for editing or select resources for operations such as exporting.
Outline
The Outline view displays a structural outline of the file that is currently open in the editor area. The Outline view shown at right displays a list of the procedures contained in a .pro file.
Editors
IDL source files have the ".pro" extension. The IDL Workbench can host many different types of editors, but .pro files are edited using the IDL-supplied .pro file editor.
The editor area of the IDL Workbench contains the file editor windows. Any number of editors can be open at once, but only one can be active at a time. By default, editors are displayed as tabs inside the editor area. An asterisk (*) indicates that an editor has unsaved changes.
Although you will mostly use the IDL-supplied editor to work with .pro files, the IDL Workbench supports many types of popular editors.
Variables
The Variables view displays the values of variables in the current execution scope. In the Visualize perspective, you can drag variables from the Variables view to the Tool Palette to create visualizations. In the Debug perspective, the Variables view allows you to see variable values in the routine in which execution halted. If the calling context changes during execution—as when stepping into a procedure or function—the variable list changes to reflect the current context.
For more information on using the Variables view while debugging, see Viewing Variable Values.
Tip
Right-click on a variable to delete it from the Variables view and from IDL memory.
Visualizations View
When no visualizations are created, the Visualizations view displays links to the tutorial video and to the relevant online help topic:

When a visualization is created, this view displays thumbnail images that represent the current visualizations. This view also allows you to control visualizations. To view a visualization, simply click on the associated thumbnail image. The blue border around the thumbnail indicates the current iTool. Any overplot action will affect the current (selected) iTool.
To close a visualization, right-click on it and select Close. To close all visualizations, click the double-x icon in the upper right of the view.
Console
The Console view displays output from both the IDL command line and compiled IDL programs. This output includes:
Command History
The Command History view displays a list of commands entered at the IDL command line. You can copy one or more previous commands and paste or drag them to an editor or to the IDL command line. You can also double-click a single command to execute it immediately.
Command Line
The Command Line view displays the IDL command line, which is used to execute IDL statements, compile and launch applications, and create main-level programs.
Tasks
The Tasks view displays tasks inserted into code files. A task is a short text string explaining an action to be completed, in relation to a particular line of code. When you are done with a task, you can remove it or mark it as completed.
Projects
In IDL, a project is a directory that contains source code files and other resources (data, image files, documentation, and so on). Projects are especially useful as logical containers for related source code and resource files. A project is saved within the IDL workspace (which is discussed later in the chapter).
While you can build and run individual .pro files, you can also build and run an entire project, as well as configure how the project is built.
Workspaces
A workspace is a directory that contains project directories, metadata about the contained projects, and information about the state of the IDL Workbench. Each workspace "remembers" the arrangement of the IDL Workbench views and perspectives. You can have as many different workspaces as you like, but only one workspace can be loaded at once.
You can select any location and directory name for your workspace. By default, the workspace directory is named IDLWorkspace and is located in your home directory (as defined by the $HOME environment variable on UNIX-like platforms and in Documents and Settings\username or Users\username on Windows platforms).








