Using Sun WorkShop

Using WorkSets and Menu Picklists

Most of the Sun WorkShop menus contain picklists that provide access to the items used by the menu. For example, the picklist on the File menu contains all the files associated with the current Sun WorkShop WorkSet. The picklist on the Debug menu contains all the programs associated with the current Sun WorkShop WorkSet.A Sun WorkShop WorkSet is the set of items contained on the menu picklists.

WorkSets and menu picklists help you keep track of the files and other items you use for your development projects. WorkShop uses WorkSets and menu picklists to provide quick access to the various directories and files associated with a given development project, including the following:

Each type of item is saved to a different menu picklist. For example, if you load a program called Freeway into the Debugging window, Freeway is added to the Debug menu picklist. The next time you want to debug the Freeway program, you can choose Freeway from the Debug menu picklist.

Although you can create your own WorkSet, you do not have to. Sun WorkShop will create one for you. Sun WorkShop uses WorkSets to save complete sets of menu picklists. Whenever you start Sun WorkShop, it either creates a default WorkSet (usually .default.wst) or it opens the last WorkSet you had open. By default, when you close WorkShop, it automatically saves your current WorkSet.

You can create new WorkSets of your own using the New WorkSet item in the WorkShop menu. By saving a WorkSet you can save all the picklist items associated with a given development project under a single name. Saving your picklist items and files as a WorkSet makes them easier to access later.

Figure 2-4 WorkShop Menu

Graphic

For example, suppose you use Sun WorkShop to:

By default, the files, build target, and program you created are added to the appropriate menu picklist. In this case, the source files are placed on the File menu picklist, the build target is placed on the Build menu picklist, and the program is placed on the Debug menu picklist. To save all of these as a WorkSet, choose WorkShop Æ Save WorkSet As, and then type a name in the Name text box of the Save WorkSet As dialog box. Sun WorkShop stores the files, target and program under the name you choose. Loading this WorkSet later reloads the files, target, and program references connected to the appropriate menu picklists.

To start WorkShop with a specific WorkSet loaded, specify the WorkSet name on the command line at startup. For example, the following command starts WorkShop with all the files, targets, programs, and so on associated with the freeway WorkSet loaded on the appropriate menu picklists:

workshop freeway.wst