PreviousCreating and Loading Projects Editing Source CodeNext

Chapter 6: Assigning Scope with Subprojects

In Revolve, subprojects act as projects within projects to make source code analysis more customized and streamlined.


You need to have read the chapter Start Here for the Tutorials! and worked through the first session, Creating and Loading Projects, before you do this session. In this session, we assume that you have created Sample.prj.


6.1 Overview

A large Revolve project can consist of many source code files. At times it is easier and more effective to take project components that you know are related or of interest and isolate them in individual analysis. Revolve facilitates this with the subproject feature. A subproject is a collection of project components that are grouped for separate analysis. Elements can be added to subprojects with the Capture Results dialog, available in most tools and browsers.

6.2 Preparation

If you closed Revolve, open it as you did before. To open sample.prj, click the Project menu and choose Open. Or select sample.prj at the bottom of the Project menu.

6.3 Sample Session

In this session you:

6.3.1 Creating a Subproject

To create a subproject:

  1. In the Project Manager, double-click cobol files.

  2. Select BATCH1.CBL and BATCH2.CBL.

    To select elements that are listed consecutively, click and drag with the mouse. To select elements that are not listed consecutively, use the control key and the left mouse button simultaneously.

  3. Click Capture Results.

    The Capture Results dialog is used to add information from a Revolve window to annotations, subprojects, .pop files, and tag files.

  4. Click Add to Subproject.


    Figure 6-1: Adding to Subprojects

  5. Click Ok.

  6. In the Add to Subproject dialog that appears, click New Subproject .

  7. Enter the SP01 into the Subproject Name field.

  8. Click Ok.

  9. Select SP01 in the Add to Subproject dialog and click Add.

    BATCH1 and BATCH2.CBL have been added to the new subproject. A Revolve prompt confirms that elements were added to the subproject.

  10. Click Ok.

    The subproject is created, loaded, and ready to be analyzed.

    Leave the Project Manager open for the next exercise.

6.3.2 Viewing and Editing the Subproject

To view the contents of subprojects:

  1. Click Subprojects... on the Project Manager's tool bar.

    The Subprojects window serves the same purpose for subprojects that the Project Manager serves for projects.

  2. Click Match.

    The * wildcard character displays all the subprojects that exist in the loaded project.

  3. Double click the subproject SP01 folder.

    Notice the two files you added in the previous exercise are displayed. In this window you can add and delete subprojects, view the source code, and add files to the subprojects.

  4. Select the entry for cobol BATCH2.CBL.

  5. Click Delete Process.

    The file BATCH2.CBL is deleted from the subproject but not from the project.

  6. Click Add Process.

    The Find dialog enables you to navigate through your project's files and locate elements to add to the subproject.

  7. Uncheck all check boxes except for COBOL.

    The Find dialog should correspond to Figure 6-4.


    Figure 6-2: Find Dialog

  8. Select cobol ONLINE7.CBL in the list.

  9. Click Ok.

    ONLINE7.CBL has been added into the subproject.

This exercise demonstrated how easy it is to manipulate subprojects.

6.3.3 Using the Subproject in Analysis

To apply Revolve's analysis features to subproject SP01:

  1. Open the Metrics tool from the Tools menu.

  2. Click Assign Scope...

  3. Select SP01.

    When you want to apply Metrics to the entire project again you select None in the Subprojects dialog.

  4. Click Ok.

    The Metrics tool displays a folder for ONLINE7.CBL and BATCH1.CBL.

  5. Select the folder for BATCH1.

  6. Click Expand One Level.

    The Metrics tool displays the measurements for the component BATCH1.CBL.

6.3.4 Before Continuing

You can close Revolve, if you want to stop for now. The project that you have created and loaded into the database is automatically saved.

You can continue with the next tutorial later, by simply reopening the project.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousCreating and Loading Projects Editing Source CodeNext