Adding comments to property files

Although IBM® Rational® Rhapsody® does not have a formal way to add comments to the property files, you can add comments by creating your own properties.

Procedure

To add comments to the property files:

  1. Create new subjects, for example:
    Subject .PRP File
    Subject SiteComment site.prp
    Subject SiteCPPComment siteC++.prp
    Subject SiteCComment siteC.prp
  2. Create a metaclass named Comments under each subject.
  3. To each metaclass, add a new property of type String or MultiLine that contains the comment text.

Results

If you place this information about top of your site<Lang>.prp, you benefit in the following ways:

Note: Do not use the String comment ("") inside the assigned strings of the comment properties.

Example

The following example shows a portion of the SiteC++.prp file with comment properties.

Subject SiteCPPComment
   Metaclass Comments
      Property RhpVersion String "v7.5 SiteC++ for Rhapsody
         Build 1368921"
      Property ChangeAuthor String "John Smith, Acme Co."
      Property LastChange String "01.30.2009"
      Property ChangeHistory MultiLine "Version 1.0
         02.08.2009"
      Property ChangeList MultiLine "
         List of Changed Properties
            Optimization Properties:
            * CPP_CG->Attribute->AccessorGenerate to False
            * CPP_CG->Attribute->MutatorGenerate to False
            * CPP_CG->Relation->RemoveKeyGenerate to False
            * CPP_CG->Relation->RemoveKeyHelpersGenerate to
               False
         Other properties:
            * None
      "
      Property GeneralComment MultiLine "
         Purpose of the changes in siteC++.prp:
         I like challenges!
         Any questions?
      "
   end
end
end

Feedback