Tool Mentor: EPF Composer Support for IBM Rational ClearCase
This tool mentor describes how the EPF Compser directly supports IBM(R) Rational(R) ClearCase(TM).
Main Description

Before EPF can be to make changes to a local copy of the Method Library, the source files that make up that library must be writable. CM systems usually maintain local files with read-only access unless they have been explicitly marked for editing through the process of checking-out individual files. Source files in the Method Library must be checked-out before they can be edited.

Note: EPF users in CM-integrated environments should be aware that relatively simple changes to method library elements may affect more than one source file. This implies that multiple files may have to be checked-out before individual method elements can be modified.

Information from the method library is cached in memory when a new library is opened. If library source files are updated outside of EPF the version cached in memory will not be refreshed. In that situation users should reload the entire method library. Alternately the libary files can be updated from within the Resource perspective.

As soon as the method library is opened EPF will create two files named .lock and .project at the same level as library.xmi. These two files should NOT be placed under version control.
Support for Rational ClearCase
Initial Setup

Integration with IBM(R) Rational ClearCase requires the SCM Adapter plug-in for Eclipse 3.1 be installed and activated in EPF. The SCM Adapter can be downloaded from http://www-128.ibm.com/developerworks/rational/library/content/03July/2500/2834/ClearCase/clearcase_plugins.html. Make sure this is downloaded and unzipped locally before proceeding.

Upon launch EPF will prompt the user to supply the location of the method library. Since the local copy of the method libray under source control hasn't been set up yet the user should simply accept the default choice. This will allow EPF to complete the launch process. Once EPF has launched use the following instructions to set up a source-controlled copy of the method library:

   1. Use the Help menu at the top of the EPF window.
   2. Select Software Updates > Manage Software Configuration.... http://www-128.ibm.com/developerworks/rational/library/content/03July/2500/2834/ClearCase/clearcase_plugins.html The "Product Configuration" window will appear.
   3. In the Product Configuration window, click Add an Extension Location. The extension in this case is the SCM adapter.
   4. Use the Browse for Folder dialog box to navigate to the folder with the SCM adapter.
   5. Select the Eclipse folder and click OK.
   6. The "Install/Update" dialog prompts the user to restart EPF. Click Yes.
   7. When EPF restarts the user will be prompted to supply to location of the method library. Use the default (temporary) selection.
   8. In the EPF main tool bar window, click Window > Customize Perspective....
   9. In the Customize Perspective dialog box, click the Commands tab.
  10. In the Available command groups column, check the box for ClearCase and click OK.

The main tool bar at the top of the Eclipse window will now include a new pull-down menu labeled “ClearCase??. At this point users can create their ClearCase snapshot view.

   1. Use the ClearCase menu and select Connect to Rational ClearCase. A small check mark will appear next to this selection in the menu when the connection is successful.
   2. Use the ClearCase menu and select Create New View.... The standard ClearCase view creation wizard will then guide the user through the rest of the setup.
   3. Select the appropriate VOB to load and click OK. VOB elements are loaded.
   4. Click OK. A dialog box should appear with the message “View successfully created??.
   5. At this point a local copy of the method library has been created but the EPF application is still pointed to the temporary library opened earlier. Use the File menu at the top of the EPF window and select Open.
   6. Navigate to the location of the snapshot view and open the newly-created copy of the method library.

Editing a Method Element

   1. Make sure the Authoring perspective is being used. Method elements can only be edited from within this perspective.
   2. When a user tries to edit an existing element a dialog box will appear with a message prompting the user to check-out the appropriate library source file.
   3. As edits are made the tab at the top of the editing window will display a "*" next to the element name. This indicate that changes have been made but not saved at this point. When the file is saved through the File - Save command the "*" will disappear.
   4. Switch to the Resource perspective.
   5. Use the ClearCase menu and select Find checkouts. Check in all changed files at once.

Note: It is very important to check in all files in one batch. If this isn't possible then don't check in any files.
Adding a Method Element

   1. Make sure the Authoring perspective is being used. New method elements can only be added from within this perspective.
   2. Use the tree-browser to navigate to the area where the new element will reside.
   3. Right-click on the target location to bring up secondary menu and select Add new element.
   4. The “Add to source control?? dialog box will appear.
   5. Note: If prompted to Add to Source Control the .lock and .project files, deselect them in the “Add to source control?? dialog box.

Deleting a Method Element

   1. Before deleting a method element, make sure that it and any files that depend on it are checked-in. If the file is not checked-in it may be left behind in the file system.
   2. Make sure the Authoring perspective is being used. Method elements can only be deleted from within this perspective.
   3. Right-click on the target element to bring up secondary menu and select Delete.

Support for Rational CCRC
Initial Setup

EPF integration with IBM(R) Rational CCRC requires a CCWeb enabled ClearCase server and the installation of an additional plugin. Enabling CCWeb is out of the scope of this document. Please contact your ClearCase administrator for CCWeb enablement. Once CCWeb is enabled and functional, The CCRC plugin can be downloaded from http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/ccrc/614/update/. Make sure this URL can be resolved before proceeding but do not download it at this time.

Upon launch EPF will prompt the user to supply the location of the method library. Since the local copy of the method libray hasn't been set up yet users should simply accept the default choice. This will allow EPF to complete the launch process. Once EPF has launched the plugin can be installed by following these instructions:

   1. Use the Help menu at the top of the Eclipse window and select Software Updates.
   2. From the submenu select Find and Install…. The "Install/Updatge" window will appear.
   3. Select Search for new features to install then click Next.
   4. Select New remote site. The "New update site" window will appear.
   5. Enter these values in the "New update site" window:
          * Name: CCRC
          * URL: http://www3.software.ibm.com/ibmdl/pub/software/rationalsdp/clearcase/ccrc/614/update/
   6. Expand the selections menu until the correct plugin is exposed. Select "Rational ClearCase Remote Client 6.14.9 for Eclipse" then click Next.
   7. Agree to the conditions in the license statement and click Next.
   8. Make sure the installer is pointing to the location of EPF and click Finish. The "Verification" window will appear.
   9. Click on Install All when prompted. The "Install/Update" window will appear.
  10. Click Yes to restart the workbench (EPF).

At this point the CCRC plugin has been installed but some additional configuration is needed. In routine usage EPF will create temporary files in the same folder as the library source files. CCRC will detect these temporary files and prompt the user to add them to source control, which should not be done. To avoid this, the CCRC preferences should be set to ignore new resources when added.

   1. Use the Window menu then select Preferences.
   2. Expand the ClearCase Remote Client tree node.
   3. Select Editors/Workspace.
   4. Make the following change to the default Editors/Workspace settings:
          * Before ClearCase operations: select Do nothing

A new perspective called "ClearCase" will be available and new icons should appear in the main tool bar at the top of the EPF window. At this point users can create their ClearCase snapshot view. It is a good practice to create the snapshot view outside of the default EPF workspace.

   1. Switch to the ClearCase perspective.
   2. Click on the icon that looks like a magnifying glass with a plus sign on it. The "Create Base ClearCase View" dialog box will appear.
   3. Enter the URL of the ClearCase Web server and the user authentication credentials, then click Next.
   4. Select load rules to populate the new view with the appropriate VOBs.

The EPF workspace is now populated with library source files managed by CCRC.
Editing a Method Element

   1. Make sure the Authoring perspective is being used. Method elements can only be edited from within this perspective.
   2. When a user tries to edit an existing element a dialog box will appear with a message prompting the user to check-out the appropriate library source file.
   3. As edits are made the tab at the top of the editing window will display a "*" next to the element name. This indicates that changes have been made but not saved at this point. When the file is saved using the File - Save menu the "*" will disappear.
   4. Switch to the Resource perspective.
   5. Use the ClearCase menu and select Find checkouts. Check in all changed files at once.

Adding a Method Element

   1. Make sure the Authoring perspective is being used. New method elements can only be added from within this perspective.
   2. Use the tree-browser to navigate to the area where the new element will reside. Identify the parent node of the new elment.
   3. Right-click on the parent element to bring up secondary menu and select New Method Plug-in. The “Add to source control?? dialog box will appear.
   4. If prompted to check-out the .lock and .project files, deselect them in the “Add to source control?? dialog box.

Deleting a Method Element

   1. Before deleting a method element, make sure that it and any files that depend on it are checked-in. If the file is not checked-in it may be left behind in the file system.
   2. Make sure the Authoring perspective is being used. Method elements can only be deleted from within this perspective.
   3. Right-click on the target element to bring up secondary menu and select Delete.