Previous Next
Advanced features

Notifying SNiFF+ of files checked-in with ClearCase
When a file is checked in with ClearCase, all Views which are configured to display the latest version of the file are immediately updated. If the file is part of a loaded SNiFF+ project, ClearCase and SNiFF+ can be configured so that the modification is notified to SNiFF+
To enable the automatic updating of the checked-in file's symbol information, the ClearCase trigger concept is used. Triggers can be defined to fire at specific events.
To notify SNiFF+ when files are checked-in with ClearCase, we need to define a trigger that fires on every checkin operation performed on any VOB that is used together with SNiFF+. In this section, you will learn how to define such a trigger.
The trigger that you define will execute a script that stores all checkin events in an Update Log File accessible to all running SNiFF+ processes. The path of the Update Log File is system dependent and will have to be set in the
SitePrefs.sniff file.
Every SNiFF+ process that has at least one opened ClearCase project will have to check the Update Log File. When SNiFF+ finds a new entry that pertains to a file currently loaded in a Project Editor, it will reparse the file and thereby update its symbol information.
Defining the trigger
The follow instructions are for defining the trigger on a Unix platform.

    Note
    The Update Log File that stores the checkin events must be writable by all developers. This is because the trigger script will run with the user id of the user performing the checkin operation. Also, the Update Log File will grow line by line with every checkin operation, so we recommend that you delete it regularly (and preferably outside usual working times).

  1. Choose the location of the Update Log File and make sure that the location is accessible from the whole network. Otherwise SNiFF+ cannot update symbol information automatically.
  2. In SNiFF+, open the Preferences dialog and navigate to the Version Control System node.
  3. Select ClearCase and press the More Options... button.
  4. In the Advanced dialog that appears, select the Enable Automatic Update check box.
  5. In the Update Log File field, specify the location of the Update Log File.
  6. In the Update Interval field, enter a value (in seconds) for the update timer.
    SNiFF+'s update timer determines how often SNiFF+ checks the Update Log File.
  7. If you want to be informed when SNiFF+ checks the Update Log File, make sure that the Show Confirmation dialog check box is selected.
    When SNiFF+ checks the Update Log File, a dialog will appear with a list of all the files checked-in since the last check of the log file.
  8. Define a trigger for every VOB used together with SNiFF+. To look at a sample trigger, refer to Sample trigger.
Sample trigger
To define a trigger, you need to have the necessary permissions to modify a VOB. Generally, either only VOB owner or your ClearCase administrator will have the needed permissions. For detailed information about permissions, please refer to your ClearCase manuals.
To define a trigger:
  1. Change to the VOB directory (here, we assume the VOB is already mounted):
    cd /vobs/hello_prj
  2. Define the trigger type.
    for ClearCase Release 3.x
    cleartool mktrtype -element -all \
    -postop checkin \
    -eltype text_file \
    -exec "$SNIFF_DIR/bin/sniff_ClearCase_notify.sh <logfile_fullpath>" \
    -c 'SNiFF+ checkin notification trigger' \
    sniff_notify_trigger
    for ClearCase Release 2.x
    cleartool mktrtype -element -global \
    -postop checkin \
    -eltype text_file \
    -exec "$SNIFF_DIR/bin/sniff_ClearCase_notify.sh <logfile_fullpath>" \
    -c 'SNiFF+ checkin notification trigger' \
    sniff_notify_trigger
    This command defines a trigger for all elements of type text_file in our example VOB. The type text_file is predefined by ClearCase. If there are other element types that should fire a trigger at checkin, simply add them to the
    -eltype option above as a comma- separated list. More options to this command are described in the manual page of the mktrtype subcommand.
  3. Repeat the above steps for all VOBs that are in use with SNiFF+

Setting your Make command
Both standard Make and clearmake can be used for building object files. The appropriate Make command can be set in the Project Attributes dialog.
SNiFF+'s shared object workspace feature is also unnecessary when using clearmake. clearmake can handle the sharing of object files (DO derived objects) between views. This is done by selecting the wink-in feature.
Setting clearmake as your Make command
To use your own makefiles:
  1. Start SNiFF+ and open the root project for which you want to set clearmake as your Make command.
  2. Check out the Project Description Files (PDFs) of all the projects.
  3. In the Project Tree, checkmark all the projects.
  4. Choose Project > Attributes of Checkmarked Projects....
    The Group Project Attributes dialog appears.
  5. Select the Build Options node.
    You will now set the Make attributes that are the same for all projects.
In the Group Project Attributes dialog
  1. Enter your command that you use to run clearmake in the Make Command field. For example:
    clearmake <options>
    This command will then be submitted to the Shell when you execute the Target > Make default target command.
  2. Select the check box to the right of the Make Command field.
  3. Press the Set for All button to apply this attribute to all the projects checkmarked in the Project Tree.
  4. Press the Ok button to apply the settings and to close the Group Project Attributes dialog.
  5. Save the modified project.