Previous Next Contents Index Doc Set Home


Starting Sun WorkShop

2


This chapter describes how to begin working in Sun WorkShop. For instructions on installing WorkShop, see the WorkShop Installation and Licensing Guide or the WorkShop Roadmap.

This chapter is organized into the following sections:

Opening WorkShop

page 13

Selecting and Using Text Editors

page 13

Getting Started with WorkSets and Menu Picklists

page 14


Opening WorkShop

Once you have installed WorkShop and added it to your command path, you can open it by typing workshop at a command prompt.

If this is the first time you have used WorkShop, the About WorkShop window appears in front of the main WorkShop window. If you have not registered, take a few minutes and do so. If you have not read the Overview or seen the video demonstrations, now might be a good time to check them out.


Selecting and Using Text Editors

Unless you have previously set your EDITOR environment variable to GNU Emacs or XEmacs, WorkShop uses the vi editor (For information on how to set your EDITOR environment variable, see the manual page for your command shell). To use the integrated GNU Emacs or XEmacs editors, you must use the Editor Options dialog box. The editor you choose will remain the default editor for subsequent sessions of WorkShop. To change editors, choose Options Text Editor Options from the WorkShop main window to open the Editor Options dialog box and choose a new default editor.

The WorkShop implementation of vi includes a reuse button. If the button is enabled, subseqently opened files are displayed in the original vi window. If the button is disabled and you open a new vi file, the new file is displayed in a new vi window. The Re-usable button in the lower-right corner of the window toggles manually between enabling and disabling the reuse feature.

Vi and XEmacs include WorkShop-specific tool bars. GNU Emacs and XEmacs include WorkShop-specific minibuffer commands that help you to browse and debug source code. In addition, you can open WorkShop from an existing Emacs session by typing M-x workshop-start in the minibuffer. To use GNU Emacs with WorkShop, you need to set the load path in your .emacs file. See the online help section "Starting WorkShop From Emacs" for instructions.


Getting Started with WorkSets and Menu Picklists

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

Each type of object 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 select Freeway from the Debug menu picklist

WorkShop uses WorkSets to save complete sets of menu picklists. Whenever you start 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. Consequently, to use WorkShop WorkSets, you do not have to do anything. The WorkShop does it for you.

If you want to create new WorkSets of your own, you can do so using the New WorkSet item in the main WorkShop menu. By saving a WorkSet you can save all the picklists objects associated with a given development project under a single name. Saving your objects and files as a WorkSet makes them easier to access later.

Figure  2-1 WorkShop Menu
For example, suppose you use the WorkShop to do the following:

1. Create and edit several source files

2. Build a program target

3. Debug the program

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, select WorkShop Save WorkSet As, and then enter a name in the chooser. The WorkShop stores the files, target and program under the name you choose. Loading this WorkSet later reloads the files, target, and program connected to the appropriate menu picklist

If you want to start the WorkShop with a specific WorkSet loaded, you can. To do so, specify the workset name on the command line at startup. For example, the command:

workshop freeway.wst
starts WorkShop with the all the files, targets, programs, and so on associated with the freeway WorkSet loaded on the appropriate menu picklist.

Adding Items to WorkSets and Menu Picklists

Whenever you start working, WorkShop remembers the last WorkSet you had open and the last set of development tasks you performed. It populates WorkShop menu picklists with the objects (files, programs, and so on) contained in that WorkSet.

Picklist objects (for example, Files on the File menu) can be added to or removed from menu picklists (and therefore to the current WorkSet) either by editing the WorkSet directly, or by adding or removing an object directly from any of the WorkShop menus.

Adding Items to a WorkSet Using the WorkSet Window

To edit the WorkSet directly, select WorkShop Edit WorkSet WorkSet_Name. When the WorkShop WorkSet window appears, use it to add or delete the desired object.

Figure  2-2 WorkShop WorkSet Window

Adding Items to a WorkSet Using a WorkShop Menu

To add an object to a WorkSet using a WorkShop menu, open the menu and select New menu_item_name. When you open a new item, it is automatically added to the menu picklist and the current WorkSet. To remove an item from a menu, select Remove menu_item_name from Menu. When the file chooser appears, select the item you want to remove.

For more information about creating, editing, or modifying WorkSets, see "Using WorkSets" in the WorkShop online help.

Figure  2-3 File Menu Picklist

.


Previous Next Contents Index Doc Set Home