Introduction to Sun WorkShop HomeContentsPreviousNextIndex


Chapter 2

Getting Started

Once Sun WorkShop is installed and added to your command path (see Access to Sun WorkShop Development Tools), you can start Sun WorkShop by typing the following at a command line:

% workshop&

For more information about the workshop command, see the workshop(1) man page.

This chapter describes how to begin working in the Sun WorkShop programming environment and contains basic information about:

For step-by-step instructions and more information, see the Sun WorkShop online help (you can access the online help through the Help menu in any Sun WorkShop window).

Working With Projects

This release of Sun WorkShop uses projects to keep track of the files, programs, and targets associated with your development projects and to build your programs without your needing to write a makefile. A project is a list of files and compiler, debugger, and build-related options used to build an executable, a static library/archive, a shared library, a Fortran application, a complex application, or a user makefile application.

When you start Sun WorkShop, the Welcome to Sun WorkShop dialog box opens and gives you immediate access to Sun WorkShop projects and the project wizard. Click on the "projects" link in the description pane to access information about projects in the online help. You can also click Help in the Welcome to Sun WorkShop dialog box for more information about that dialog box.

Through the Welcome to Sun WorkShop dialog box or the commands available from the Project menu in the WorkShop main window, you can:

If you have Sun WorkShop worksets, you can automatically convert your worksets to Sun WorkShop 6 projects when you load them (for step-by-step instructions, see "Converting a Workset to a Project" in the Working With Projects section of the online help).

You can also choose to use the Sun WorkShop 6 programming environment without loading a project. Picklists keep track of the files, programs, directories, and targets associated with your development projects (see "WorkShop Targets" in the Building Programs section of the online help for more information). You can access each file, build target, and debug executable from the menus in the WorkShop main window.

Creating a Project

Through the Welcome to Sun WorkShop dialog box or through the Project menu in the WorkShop main window, you can ask the project wizard to help you create a project.

From the Welcome to Sun WorkShop dialog box, you can:

Create a New Project The Create a New Project wizard guides you through creating a new project from existing source files. You choose the type of project, and the wizard prompts you for information to create that type of new project.
Build a Simple Program The Create New Project wizard helps you build a single executable from a set of source files. There are limited compilation options and only standard libraries to which to link.
Create an Empty Project The Create Empty Project dialog box opens, and you request that a new project be created that has no existing source files. A text editor window opens so you can begin creating your program.


The Create New Project wizard prompts you to define your project settings. Then Sun WorkShop creates the type of project you defined (a file with a .prd file extension) with the source files you requested.

You can share that project file information with multiple members of your development team by creating a project that has an absolute/full path to the project file and a relative (file/base name only) project directory. For example, your team has a workspace for your project, and you create a project named ws.prd in the top level directory of the workspace:

Project file name: /home/workspaces/ws/ws.prd
Project directory: .

A team member can have a copy of the workspace in /export/myws and by opening the project file /export/myws/ws.prd, the project applies to that team member's local files and to no other team member's files.

Building Project Targets

Once you have created your project, you can build project targets by doing one of the following:

After you select one of these methods, Sun WorkShop:

  1. Creates a makefile from the project settings you defined in the Create New Project wizard or the Edit Current Project window.

  2. Opens the Building window.

  3. Starts the make utility.

  4. Shows the results of the build in the Building window.

    When you click on a build error hypertext link in the Building window, your text editor opens with the build error highlighted so you can examine and fix it.

For more information, see:

Editing a Project

You can edit your project through the Edit Current Project window. To open the Edit Current Project window, choose Project Edit Project in the WorkShop main window. For more information, see "Editing a Project" and "Edit Current Project Window" in the Working With Projects section of the online help.

Using the WorkShop Main Window

The WorkShop main window helps you access the tools you need to create, develop, debug, and fine tune your applications and lets you choose your text editor and set different types of options.

FIGURE 2-1 displays the WorkShop main window.


FIGURE 2-1   WorkShop Main Window

For more information about the WorkShop main window, see "WorkShop Main Window" in the online help. (To open the online help, choose Help Contents in the WorkShop main window.) To set colors, fonts and other types of resources used in WorkShop windows, see Appendix A.

Choosing a Text Editor and Text Editor Options

This release of Sun WorkShop provides the following integrated editors:

To change your default editor and set text editor options, choose Options Text Editor Options in the WorkShop main window. The Text Editor Options dialog box opens. The options displayed in the dialog box change depending upon the editor you choose in the Editor to Use pull-down menu. The editor you choose will remain your default editor until you select another editor in the Text Editor Options dialog box.

For more information about each editor's options, see:

You can set colors, fonts and other types of resources used in WorkShop integrated text editors. For information on changing the default resources of Sun WorkShop in the Common Desktop Environment (CDE) and non-CDE environments, see Appendix A.

Setting Startup and Project Options

Sun WorkShop offers you startup and project options through the Options menu in the WorkShop main window.

Startup Options

By default, Sun WorkShop at startup:

To change these startup options, choose Options Startup Options from the WorkShop main window menu bar to open the Startup Options dialog box. For more information about these options, see "Startup Options Dialog Box" in the WorkShop Main Window section of the online help.

Project Options

By default, Sun WorkShop treats projects in the following way:

To change these project options, choose Options Project Options from the WorkShop main window menu bar to open the Project Options dialog box. For more information about these options, see "Project Options Dialog Box" in the WorkShop Main Window section of the online help.

Accessing Sun WorkShop Components

The WorkShop main window helps you access the tools you need to create, develop, debug, and fine tune your applications. The following chapters introduce you to the components of Sun WorkShop and how Sun WorkShop can help you:


Sun Microsystems, Inc.
Copyright information. All rights reserved.
Feedback
Library   |   Contents   |   Previous   |   Next   |   Index