Over the years, many clients have developed their own programming practices and naming standards to reinforce company policies. When editing workstation source files (COBOL or PL/I) with non-standard file extensions, the file extensions have to be defined to Eclipse in order to be recognized by the Rational Developer for System z (RDz) editors. This technical blog will further describe in detail the steps involved for adding the file extensions to Eclipse's general "Content Types".
This example demonstrates how to add two new file extensions (*.PLIH and *.PLIM) for PL/I Source and Include file type to the "Content Types" association.
1. From the RDz workbench, click Window -> Preferences
2. In the field labeled "type filter text", begin typing the string "content" and observe where the filtering occurs with each key stroke
3. On the navigation view, select "Content Types" underneath the "General" category. The list of content types will be displayed in the main view
4. Scroll down and expand the list of source "Text" file types by clicking on the ">" sign next to "Text"
5. Scroll down the list of Text file associations and select "PL/I Source File"
6. On the bottom right corner of the view, click on the "Add" button to define a new Content Type association for *.PLIH
7. Click on "OK" to confirm the new file association
8. Next, add the file association for PL/I Include files. Expand the list of PL/I source file types by clicking on the ">" sign next to "PL/I Source File" and select "PL/I Include File"
9. On the bottom right corner of the view, click on the "Add" button to define a new Content Type association for *.PLIM
10. Click on "OK" to confirm the new file association
11. Lastly, commit the changes to workspace by clicking the "OK" button at the bottom of the Preferences window
With these changes in affect, RDz will be able to recognize the new file associations and content type when developing and editing source files. For more information, please refer to Technote# 1622397 entitled: Rational Developer for System z - When changing the 'File System mapping' and 'File Associations', update also the 'Content Type'