![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
directory viewerWhen Apex visits a directory, it opens a directory-viewer window that displays a list of files and directories. The directory-viewer window is sometimes referred to simply as the directory viewer.
You can use the directory-viewer window to navigate through the UNIX directory structure, open files and directories, and view other files and directories.
directory viewer window (graphics)![]()
home directory (graphics)For the tut_user user, the directory viewer displays:
![]()
subsystem and viewApex supports the dividing of a software-development effort into high-level components called subsystems, each containing a group of logically related objects. Subsystems let you group related files together.
Every subsystem is associated with a set of views. Working views provide areas for the development and integration of software. Release views contain the products developed within a subsystem during the development process.
Note: In UNIX, a subsystem is a directory with a .ss filename extension and a view is a subdirectory with a .wrk or .rel extension. Because subsystems and views are directories in UNIX, their names are case-sensitive.
Create a subsystemCreate a subsystem named project1.ss:
New Subsystem dialog box (graphics)![]()
filled in New Subsystem dialog box (graphics)![]()
File menu (graphics)![]()
New submenu (graphics)![]()
Note: Your New menu may not match. It might have additonal entries and/or different entries. This is just an example of a New menu.
Jobs window for create project1 subsystem (graphics)![]()
Messages window for create project1 view (graphics)![]()
Create a viewCreate a working view named hello.wrk..
New View dialog box (graphics)![]()
filled out New View dialog box (graphics)![]()
Jobs window for create view (graphics)![]()
Messages window for create view (graphics)![]()
project1.ss (graphics)![]()
project1.ss/hello.wrk![]()
Select the File:New:New C++ command
- 1. . Select the File menu (graphics).
The New submenu (graphics) is displayed.
- 2. . Select the New C++ command.
The New C++ dialog box (graphics) is displayed.
New C++ dialog box (graphics)![]()
filled in New C++ dialog box (graphics)![]()
C/C++ editor
/* * * File:/export/people/tut_user/project1.ss/hello.wrk/hello.C * */ #include "iostream.h" int main (int argc, char[] argv) { cout << "Hello world!" << endl; } /* End of hello.C */
C/C++ editor window (text and graphics)The C++ editor window is where you write, edit, compile, and link code. Files created by Apex contains a comment line identifying the file, along with a stub that is ready for you to fill in.
The C/C++ editor window containing the initial version of hello.C looks like:
![]()
Using the editor:
- To type new text, move the blinking cursor to the exact insertion point where you want to enter text. You can use the arrow keys to move the cursor, or you can click the mouse pointer on the space you want the cursor to appear.
- The editor window is always in insert mode; unlike other line editors (vi, for example) you can type and move the cursor without toggling the command mode.
- To delete the previous character, use the Delete or Back Space keys.
Enter the C++ main program
- 1. . Use the C/C++ editor window (text and graphics) containing the hello.C file.
- 2. . Click on the blank line above the int main line and add the include line:
#include " iostream.h"
- 3. . Select the int argc, char* argv[] arguments and delete them;
- 4. . In the line after the opening brace ({), type the line:
couti << "Hello world!" << endlNote: The errors in the above line are placed there on purpose; couti should be cout, and the statement needs a statement terminator (:). These errors will be corrected later in this module.
Select the Compile:Code commandFrom the Compile menu, select the Code command.
This command checks the code in this object for errors and if no errors are found, generates object code.
Jobs window for the code command (graphics)![]()
Message window for the code command (graphics)![]()
Select the Compile:Link commandFrom the Compile menu, select the Link command.
This command checks the code in this object for errors and if no errors are found, an executable is generated.
Jobs window for the link command (graphics)![]()
Message window for the link command (graphics)![]()
Object viewer with errors from the code command![]()
Select the executable in the directory viewer (text and graphics)Click on hello* with the mouse pointer.
The hello.C file is highlighted:
![]()
If the directory viewer displaying the view hello.wrk is covered, you can raise it by selecting the Navigate:Context command in the C/C++ editor.
Select the File:Run command
- 1. . Select File menu (graphics) in the project1.ss/hello.wrk directory viewer window.
- 2. . Select the Run command.
Apex displays the Run dialog box (graphics).
Run dialog box (graphics)![]()
Jobs window for the run command (graphics)![]()
Messages window for the run command (graphics)![]()
Summit/CMPlacing a file under version control tracks the file's development in the Configuration Management and Version Control (Summit/CM) database by saving different versions of the file as it is developed. Making files controlled allows multiple developers to easily develop and have visibility to the same set of files, each of which may be under different stages of development.
checking files in and out
By default, controlled files are not modifiable, although you can compile against controlled files. To make a controlled file modifiable, you must check out the file using the Control:Check Out command. Checking out a file from the Summit/CM database has these important effects:
- it creates a working version of the file whose contents match the latest version in the Summit/CM database
- the working version of the file becomes writable by you and others in the group
Once you have checked out am file, you can make changes to it, save it, and make more changes. None of these changes are reflected by the Summit/CM database until you check the file in, using the Control:Check In command. Checking in a file has the following effects:
- adds a new version of the file to the Summit/CM database that matches the current contents of the file
- makes the file read-only
![]()
version history
Each time you check out, modify, and check in an object you add a new version of the object to the Summit/CM database. This sequence of versions is called a version history. Each version represents a snapshot of the object at some moment in time. For example, Object A pictured below has three versions, each one containing an image of the object as it appeared at the time it was checked in. You can visit any version in an object's version history
![]()
version history families
Within the Summit/CM database is a directory that stores the version histories for each controlled object. By default, this directory is called Common. You can create and name other directories within the database in order to group similar objects. This is useful for performing operations on all the version histories you have grouped in a particular directory. Because they group the version histories of several controlled objects, each directory is called a version history family. When you control an object, you associate it with a particular version history family. Objects associated with the same version history family are said to share the same history.
Select (highlight) hello.C in the directory viewer(graphics)![]()
Select the Control:Change Object Properties command
- 1. . Select the Control menu
- 2. . Select the Change Object Properties command from the Control menu.
- 3. . The Change Object Properties dialog box (graphics) is displayed.
Change Object Properties dialog box (graphics)![]()
filled in Change Object Properties dialog box![]()
Select the View:Format:CM Attributes command
CM Attributes command![]()
project1.ss/hello.wrk with CM attributes![]()
Select the Control:Check Out command.
Check Out dialog box![]()
project1.ss/hello.wrk with CM attributes![]()
Add a comment anywhere in the code
- 1. . In the C/C++ editor window (text and graphics), position the cursor before the #include statement.
- 2. . Type in the comment:
updated hello.C![]()
Select the Control:Check In command
- 1. . From the Control menu, select the Check In command.
The Check In dialog box is displayed.
Check In dialog box![]()
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |