Tornado not only allows you to customize the appearance of the display to match your preferences, but it also allows you to add menu entries for other tools you may wish to use. The Options entry in the Tools menu displays commands that change the fonts, colors, editor settings, and other defaults for Tornado. The Customize entry in the Tools menu opens a dialog box for adding menu items.
Use the View>Toolbars menu item to customize the toolbars that are displayed in the IDE. All toolbars can be floating or docked. Each menu item acts as a toggle to display or hide the specified toolbar. The options are:
The Download page provides options for handling symbols when objects are downloaded to the target (Figure 12-1).
|
|
|||||||||||||||||||
Select Options in the Tools menu, then click the Editor tab to adapt the editor to your preferences. The Editor page is shown in Figure 12-2.
If you are accustomed to another editor, you may want to use Tornado only as a viewer and to provide debugging context, and pass control to your preferred editor when you want to make changes to a file. Select Options in the Tools menu, then click External Editor to specify an editor other than the Tornado editor. The External Editor page is shown in Figure 12-3.
Select Options in the Tools menu, then click Projects to specify certain project attributes. The Projects page is shown in Figure 12-4.
For example, using Tornado 1.0.1-style Build menu customizations, you can add a command that compiles the default make target in the same directory as the file currently open or selected in the Project tool. Use the $filepath macro in Working Directory and leaving Build Target blank in the Customize Builds dialog box.
If your organization uses a source-control (sometimes called configuration management) system to manage changes to source code, you probably need to execute a command to "check out" a file before you can make changes to it. Select Options in the Tools menu, then click Version Control to create commands to automatically check out or check in an open file using your version control system. The Version Control page is shown in Figure 12-6.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
See Figure 12-7.
|
|||||||||||||||||||
|
|
|||||||||||||||||||
Select Options in the Tools menu, then click Fonts/Colors to change the fonts and colors that Tornado uses for all text windows: the editor window, the shell, and the debugger command window. The Fonts/Colors page is shown in Figure 12-8.
The Font selection boxes allow you to select a typeface, weight, and size in points. Different fonts are appropriate for different working environments: for example, usually a smaller point size is more desirable on a lap-top than on a large desktop display. The Sample box shows you what your selections will look like.
If you check the Syntax Coloring box, Tornado will identify various distinguished window elements by color, including syntactically distinguished text and the attribute-panel markers that appear during debugging.
You can choose which window element to color by clicking an entry in the Items list box. Table 12-2 describes the window elements available for coloring. The Foreground Color and Background Color panels allow you to control the foreground and background independently for each window element; click on the desired color in either list to assign that color to the currently selected window element.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
Select Options in the Tools menu, then click Debugger to customize various debugger attributes. The Debugger page is shown in Figure 12-9.
Select Options in the Tools menu, then click Tornado Registry to change the Tornado registry. The Tornado Registry page is shown in Figure 12-10.
A local registry resides on your local host. It lists any target servers you have running on your host. If others are using your machine as a remote registry, their target servers will also appear on the list; otherwise only your local target servers are known to Tornado.
A remote registry resides on another host. All your target servers and any other networked target servers known to that registry are listed. You can specify either the host name or the IP address of the remote host.
You can add entries to the Tools menu to allow easy access to additional tools. Before you add any commands in this part of the menu, Tornado displays the placeholder No Custom Tools as a disabled menu entry. The Customize command in the Tools menu allows you to add (or remove) entries at the end of the Tools menu.
Click Customize in the Tools menu to open the Customize Tools dialog box (Figure 12-11).
The Menu Contents list box in the Customize Tools dialog box shows all custom commands currently in the Tools menu. When you select any item in this list, you can edit its attributes in the three text boxes near the bottom of the dialog box.
The three text boxes near the bottom of the Customize Tools dialog box allow you to specify or change the attributes of a custom command.
At the bottom of the Customize Tools dialog box are the following check boxes:
When this box is checked, Tornado prompts for command arguments using a dialog box, when you click the new command. The command line is displayed in a window where you can add additional information. (See Figure 12-12.)
The pop-up menu opened by the buttons to the right of the text boxes provides several macros for your use in custom menu commands. These macros allow you to write custom commands that are sensitive to the context in the editor, or to the global Tornado context. For example, there are macros for the full path of the file in the active editor window, and for useful fragments of that file's name. Table 12-3 lists macros for editor context; in this table, the phrase active file refers to the file that is open in the active editor window (or selected in the project facility if no editor window is open).
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
Table 12-4 lists macros for the project facility context.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
Table 12-5 lists macros for the global Tornado context.
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
|
|
|||||||||||||||||||
These macros are available for custom entries in the Build menu as well as for the Tools menu. For information on making them available though the Build menu, see 12.3.4 Project. For information on using them for custom builds, see 12.4.3 Customizing the Build Menu.
This example illustrates how to use the Customize Tools dialog box to add an Uncheckout command to the Tools menu: the command cancels the checkout of whatever file is currently open in Tornado (that is, the file visible in the current editor window). Figure 12-13 illustrates the specification for a ClearCase command to uncheckout a module.
The Menu Text entry indicates that the command unchecks out a file, but is not specific to any particular file. The Tool Command field uses the $filepath macro (Macros for Customized Menu Commands) to expand the current file to its full path name.
In this example, the Prompt for Arguments box is checked. When the new Uncheckout command in the Tools menu is executed, the predefined argument list appears as a default in a dialog box (shown in Figure 12-14), to permit specifying other arguments if necessary.
Figure 12-15 illustrates the specification for a command to run the Windows Notepad editor on the file that is currently open in Tornado. The Menu Text contains a useful name, while the Tool Command field uses the actual execution command and $filepath to identify the current file. In this case, Prompt for Arguments is not checked; thus the editor runs immediately.
Tornado includes a suite of software-development utilities described in the GNU ToolKit User's Guide: The GNU Binary Utilities. If you execute any of these utilities frequently, it may be convenient to define commands in the Tools menu for that purpose.
Figure 12-16 illustrates the specification for a command to run the sizearch utility, which lists the size of each section of an object module for target architecture arch. In this case, the Tool Command field uses $filedir/SIMNTgnu/$basename to construct the path and name of the object file generated from the current source file The Working Directory field is filled in using the browse option to locate the appropriate version of sizearch in the correct directory.
You can add a Tools command to link your Web browser directly to announcements from Wind River (and to related Internet resources). Figure 12-17 shows the specification for a Wind River Web Page command. (For a description of the information available on the Wind River home page, see 1.6 Customer Services.
If you are using Tornado 1.0.1 build techniques, you can add commands to the Build menu to build any object that can be generated using make. Typically this requires first generating (or writing) a makefile that specifies the rules to build that object. It also requires checking Show Tornado 1.0.1 menu items on the Project tab of the Tools>Options menu (see 12.3.4 Project).
Once a makefile is in place, click Customize in the Build menu to add your own commands to the bottom part of that menu (or to remove commands you no longer need). The Customize Builds dialog box appears (Figure 12-18). This dialog box shows all custom entries already present in the Project menu (if any), and allows you to add commands to, remove commands from, or reorder the list of custom Project commands.
The Menu Contents list box in Customize Builds shows all custom commands currently in the Build menu. When you select any item in this list, you can edit its attributes in the three text boxes near the bottom of the dialog box:
When Tornado begins executing, it checks for initialization files of the form .wind\filename.tcl in two places: first under c:\tornado (that is, in the directory specified by the WIND_BASE environment variable), and then in the directory specified by the HOME environment variable (if that environment variable is defined). If any files are found, their contents are sourced as Tcl code when Tornado starts.
The Tornado.tcl file allows you to customize the Tools menu and tool bar, as well as other elements of the Tornado window. For example, you can have your own dialog box appear based on a menu item you add to any menu. For more information about the Tcl customization facilities available, see the Tornado API Programmer's Guide or the online Tornado API Reference.