Advanced Customization > Services and Infrastructure Customization > Enumerated Types > Editing the Resource Info for an Enumerated Type
  
Editing the Resource Info for an Enumerated Type
The name of the resource info file is RB.rbInfo, with the simple package name prepended, for example, MySizeRB.rbInfo. The following sections describe the resource info files.
Enumerated Type Resource Info Header
Each resource info file contains the following lines that define certain file level information:
ResourceInfo.class=wt.tools.resource.EnumResourceInfo
ResourceInfo.customizable=true
ResourceInfo.deprecated=false
The first line classifies the resource info and should never be changed. The values of the second two lines can be changed by the owner of the package, if the file should not be customized and if the file is deprecated.
Resource Entry Format
See “Resource Entry Format” section in Resource Info (.rbInfo) Files in Internationalization and Localization .
The <key>.value, the two Display values (abbreviatedDisplay and fullDisplay), and the two Description values (shortDescription and longDescription) are the only ones that are localizable.
Resource Entry Contents
The following are examples of the entries:
lrg.value=Large
lrg.order=30

med.value=Medium
med.order=20

sm.value=Small
sm.order=10
If the order properties are not defined, the options will be displayed in alphabetical order, using the locale specific display value. One of the entries can have defaultValue set to true. For example, the attributes for the "sm" value could be as follows:
sm.value=Small
sm.shortDescription=Small Comment
sm.order=10
sm.defaultValue=true
Building Runtime Resources
Windchill provides a utility to build the runtime resource for the .rbInfo files.
To build the runtime resources into the codebase for a particular RB file, use the following command:
ResourceBuild <package.ClassName>
For example:
ResourceBuild example.MySizeRB
To build the runtime resource into the codebase for all the resource info files for a particular directory, use the following command:
ResourceBuild <directory_relative_to_src>
For example:
ResourceBuild example
The above script is a convenience wrapper for the bundle target in the bin/tools.xml Ant script. To see all the options available for direct use of the bundle target, use the following command:
ant -f bin/tools.xml bundle.help
The resulting resource file is named <name>.RB.ser, which is a serialized instance of SerializedResourceBundle. For example, src/wt/example/MySizeRB.rbInfo will build to codebase/wt/example/MySizeRB.RB.ser.
To verify the values stored in a resource bundle, a verification utility is provided by the EnumeratedType base class. A batch file, enumVerify.bat, can be used to invoke this verification, as follows:
enumVerify <fully_qualified_EnumClassname>[<language>][<country>][<variant>]
The following are examples of usage:
enumVerify wt.lifecycle.State
enumVerify wt.lifecycle.State fr
enumVerify wt.lifecycle.State fr CA
For information on locales, and codes for languages and countries, see the java.util.Locale class entry in your installed Windchill Javadoc.