Wing IDE Professional and Wing IDE Personal allow you to create and switch between subsets of the IDE's tools, as appropriate for particular kinds of work, such as editing, testing, debugging, working on documentation, and so forth.
These subsets, or perspectives, are named and then accessed from the Tools menu, which provides a sub-menu for switching between them. The current perspective is shown in brackets in the lower left of Wing's window.
The Tools menu also contains an item for displaying the Perspective Manager. The Perspective Manager shows the name of each perspective, whether or not the perspective is shared, whether or not the perspective is auto-saved, the perspective style, and the key binding (if any) that is assigned to it.
The name of a perspective can be changed by clicking on the name within the list and editing it in place.
When perspectives are shared, they are stored in the shared perspectives file, which is configured with the Shared Perspective File preference, instead of in the project file. This makes the shared perspectives available across all projects, or potentially to multiple users. When multiple instances of Wing share this file, Wing will watch for changes and auto-reload the set of perspectives into each instance of Wing, as another instance makes changes. Note that when a shared perspective is un-shared, it is moved into the project currently open in the instance of Wing that un-shared it.
When the Auto-save Perspectives is set to Configured by Perspective, the Perspective Manager will include a column to specify whether the perspective should be auto-saved before transitioning to another perspective. This is described in more detail below.
The perspective style can be used to control how much state is stored in the perspective: By default Wing stores only the overall layout of the GUI and set of tools present. Setting this to "Tools and Editors" will cause the perspective to control also which editors are open. Setting it to "All Visual State" will store also the detailed state of the tools and editors, including scroll position, selection, search strings, tree expansion states, and so forth.
When a key binding is defined, that key sequence will cause Wing to switch to the associated perspective.
Perspective Manager Context Menu
The Perspective Manager provides the following functionality in its context (right-click) menu:
- New creates a new untitled perspective with the current state of the application.
- Duplicate makes a copy of the selected perspective, including its stored application state.
- Delete removes the selected perspective.
- Set Key Binding displays a dialog in which the key binding desired for the perspective can be typed. This key sequence will cause Wing to switch to that perspective.
- Update with Current State replaces the stored state for the selected perspective with the current application state.
- Restore Saved State loads the state stored in the selected perspective without making that perspective current.
The Perspective Manager's Configure button displays the preferences that control how perspectives work. These include:
- Auto-save Perspectives -- Selects when the current GUI state should be auto-saved into a perspective before switching to another perspective. Always will always auto-save all perspectives, Never disables auto-save entirely, Prompt causes Wing to prompt each time when leaving a perspective, and Configured by Perspective allows the behavior to be controlled for each perspective, in the Manage Perspectives dialog. The default is Always so that the last application state is always restored when returning to the perspective. Disabling auto-save can be useful for perspectives that should always start with a previously stored fixed state.
- Shared Perspective File -- This is used to specify where shared perspectives are stored on disk. The default is a file perspectives in the User Settings Directory.
Auto-perspectives can be used to automatically switch between the built-in perspectives edit and debug when debugging is started and stopped. When this is enabled, Wing by default will show fewer tools when editing and most of the debugging tools only while debugging. If the user alters which tools are shown from the defaults, this will be remembered the next time debug is started or stopped.
Auto-perspectives are off by default and can be turned on with the Automatic Perspectives attribute under the Debug tab in Project Properties.
Once this is enabled, Wing will save the unnamed pre-existing perspective as user and will display the appropriate perspective edit or debug with its default tool set. Note that the perspectives edit and debug are not created until the first time debugging is started. After that, they appear in the Goto Perspective sub-menu in the Tools menu and in the perspective manager.
Restoring Default Toolset
In Wing IDE Pro, the Tools menu item Restore Default Toolset will restore the tools appropriate for the current perspective. If this is any of the built-in perspectives edit, debug, or diff and the Automatic Perspectives preference is turned on, then the tool set will differ from that which is used for user-defined perspectives or when automatic perspectives are disabled.