RADE

Workflow Management

Working with the RADE Dashboards and SCM

Source Code Manager features in the dashboards

Technical Article

Abstract

This article describes the use of Source Code Manager (SCM) commands available in Visual Studio .NET, other commands (specially mkmk and related functionalities) are explained in another topic: Principles of use - How to open and build a CAAV5 workspace.

If you work with the C++ Interactive Dashboard and your environment has not been set-up for CAAV5 tools, we advise you to read Customizing Visual Studio .NET.

Finally, if you are familiar with CAAV5 commands, Workbench commands mapping will give you the correspondences between DOS/shell commands and Visual Studio .NET menus and windows.

Conventions: in the rest of this paper, labels of menus or window items are written using "this format".


Getting Started

Even if they appear in Visual Studio .NET menus, Source Code Manager commands don't work until you open a workspace which is managed by it.

If you try to use them before opening a workspace, you will get the following message:

There are three situations to study:

Opening a Workspace

From the File menu, select Open CAA V5 Workspace....

The following window appears. Select Mkmk & Source Code Manager in the combo box to make active the last three fields.

Opening a workspace this way means that you can access mkmk commands (instead of the Mkmk choice which doesn't give access to Source Code Manager commands).

After entering the name of your workspace and the tool level, click OK. A log window appears while your environment is updated and the workspace opened. When this window has disappeared, Visual Studio .NET loads the project files it stored in your workspace and you are ready to work.

How to Work...

Source Code Manager commands are useful for workgroup support, that is when several people work on the same software and need to share their files. Using the Source Code Manager each person creates its workspace, all workspaces declared in a base are organized in a tree whose top is called BSF, intermediate levels are typed "project" and leaves are "development" workspaces: the commands which are available from the dashboard are those needed in this kind of workspace, if you need other commands you can open a DOS window in which you can run any of them from the workspace currently opened in Visual Studio .NET: open menu Window and select Open Command Window.

Locally in Your Workspace

When working with the Source Code Manager, any action performed on the content of the workspace file system must be declared - registered in a repository - to the Source Code Manager:

Declaring New CNext Directories

New CNext directories must be declared only if they have been created in your workspace, not if they have been copied from another workspace (because they might have been already declared from this other workspace). From the CAA V5 Source Code Management menu, select Declare Directory in Database..., then use the file tree displayed and select the directories to register with corresponding check buttons.

  • If you declare a new Module (see figure above) in a new Framework, don't forget to declare the embedding framework too.
  • A directory can be registered by only one person, other people must get a copy of it by selecting Attach Frameworks/Modules... in menu CAA V5 Source Code Management.
Declaring New Files

Like for directories, files created in your workspace must be registered in the Source Code Manager repository, to do so, from the CAA V5 Source Code Management menu, select Declare File in Database....

When you click OK, a log window is displayed while the files are being registered. After the completion the selected files are no more writable except if you clicked on the Check-out file(s) check box, in this case each file is checked-out after its registration, so you can continue to work on it.

Any (source) file needed to build a component must be declared to the Source Code Manager because the tool doesn't browse your file system to find what has been created, modified or deleted. If you want to know if all has been registered you can ask the Workspace Manager to check your file system.
Deleting Files

Any file or directory can be removed from any workspace. However, considering the deletion of component is not a task devoted to developers, no command to remove a directory has been provided through Visual Studio .NET.

Note that the deletion of any data will be propagated to other workspaces, if you just want to clean up your workspace use Detach Frameworks/Modules... instead. Note also that you must use Source Code Manager commands to remove data from your workspace because it will detect inconsistencies if you don't do so.

To delete, from the CAA V5 Source Code Management menu, select the Move/Rename/Remove sub-menu, and select Remove a File... The file which is automatically selected is the one currently edited in Visual Studio .NET. You can select files in the file tree.

Moving Directories or Files

You can move and rename a directory or a file using the same command. From the CAA V5 Source Code Management menu, select the Move/Rename/Remove sub-menu, and select Move/Rename...

Moving a file or directory

Select the file or directory to move, "drag & drop" it to the destination directory, or use the Cut and Paste contextual menu commands.

Renaming a file or directory

Select the file or directory to rename, and click once more to be able to modify the name, or use the Rename contextual menu command.

Modifying Existing Files

Before modifying a file, check it out from the Source Code Manager repository, the main interest being to indicate that this file is being modify and that any further command should take care of it:

To check-out a file, open menu CAA V5 Source Code Management and select Check-Out.... The current edited file is selected by default. As you may want to check-out several files at the same time you can select several files in the file tree.

It is possible to check-out a file in a special mode named private. In this case, the file can be modified but the system will prevent you from delivering this file. For instance, when you want to modify some files for debug purposes, you don't want these modifications to be promoted with other normal modifications. To do this, from the CAA V5 Source Code Management menu, open the Private Files sub-menu and select Check-Out Private File. The file which is currently edited will be checked-out in private mode.

Checking Your Workspace Against Database

The purpose of checking your workspace against the (Source Code Manager) database is to detect files which are not yet managed or which have been edited without being checked-out. This command helps you prepare your workspace to be delivered to other people because only modifications declared to the Source Code Manager will be delivered afterwards.

From the CAA V5 Source Code Management menu, select the Information sub-menu, and select Check Workspace.... A dialog box is opened in which you can select one or more framework to check, which can be useful for a workspace containing many frameworks.

Check messages are displayed in the Mkmk output window that lets you run omitted commands without losing these traces. The detected errors are:

The appropriate actions to fix these errors are:

  1. Declare missing files in database using Register file in database...
  2. Extract the file from the database by projecting the embedding directory, consult the adl_project reference page
  3. Change the file mode using Windows commands

This might show that you modified this file without checking it out, check it now:

With Other People

In the context of working in a development workspace, there are only two commands to know to exchange data with other people. A development workspace has a father workspace and no son, so the only data flow is to or from the father workspace:

These three commands do not require any parameter, however particular options can be specified in the common dialog box, consult adl_promote and adl_sync reference pages to find out more.

 

If you work in a project workspace and if you want to use Source Code Manager commands from Visual Studio .NET, open a DOS window to run commands such as adl_collect or adl_publish.

With Multiplatform Workspaces

A multiplaform workspace is a workspace having one database representation and two file system representations: one on a Windows machine and another one on a Unix machine. The way to create such a workspace is broken down into 3 steps:

If we consider the fact that one workspace can have 2 file system representations, it is possible to work on only one platform at a time. When you work on one platform and you need to work on the other one, 2 commands are necessary:

  1. Register the content of your current working workspace using adl_photo or any command which leads to data transfer between workspaces (adl_sync, adl_promote).
  2. Project the files corresponding to this "photo" to the other side:

To run one of these two commands from Visual Studio .NET, open the CAA V5 Source Code Management menu, then open the Unix <-> NT sub-menu, and select Photo... or Refresh....

Getting Information on the Current Workspace Status

This section gathers commands used to obtain information on your current workspace:

Workspace Status

Open the CAA V5 Source Code Management menu, open the Information sub-menu and select Display Workspace Status.... A log window opens and the status is displayed in the Output window (see below.)

Workspace Hierarchy

This command can be used to display the names of existing workspaces and how they are organized. Open the CAA V5 Source Code Management menu, open the Information sub-menu and select List Workspaces....

You can choose to display workspaces "under" or "above" a given workspace or to display workspaces owned by a given user.

It is possible to list "deleted" workspaces because, even if they cannot be used anymore, they still exist in the repository.

List frameworks/module

This command is especially useful to know what are the frameworks and modules that can be attached to the current workspace. Note that a workspace can attach only copies of frameworks and modules which are managed in its father workspace.
Open the CAA V5 Source Code Management menu,  open the Information sub-menu and select List Frameworks... or List Modules....

In the windows, the Attached ... radio buttons correspond to data already present in your workspace while the Visible ... radio buttons allow you to display also what can be attached.

List checked-out or private files

This command lists the files you have checked-out since the last "photo" of your workspace, a "photo" is done each time you ask for it (CAA V5 Source Code Management/UNIX<->NT/Photo...) or when you exchange data with another workspace (promotion, synchronization). Note that the command lists private files too.

Open menu CAA V5 Source Code Management, open submenu Information and select List Checked-Out Files....

[Top]


In Short

[Top]


References

[1] Customizing Visual Studio .NET
[2] Working with the RADE Dashboards - Part 1
[Top]

History

Version: 1 [Jan 2000] Document created
[Top]

Copyright © 2005, Dassault Systèmes. All rights reserved.