Configuring Eclipse File Associations for Agentry Projects

Prerequisites
The following items must be addressed before performing this procedure:
  • For Eclipse implementations to which the Agentry Editor plug-in was added, review the current file associations before making any modifications. Any current configuration of file associations for file types of .sql, .bmp, .bat, and .sh should be noted.
  • Determine the desired editor within Eclipse to use for each of the file types that may be a part of the Agentry application project. This may be done now or during this configuration procedure.
Task

In this procedure the file associations within Eclipse will be configured for the file types that may be a part of an Agentry application project. These file associations will determine which editor or view within Eclipse will be used to display the file contents and allow those files to be edited. The file associations configured in this procedure are those available in Eclipse as provided by the Agentry Editor installer. If there are other tools available for a particular implementation, those may be used as preferred or desired. The process for creating these file associations is the same. The selection of the particular tool within Eclipse for a particular file type is dependent on those available and preferred. Eclipse must be running to make these modifications.

Specifically the editors for bitmaps (.bmp), Windows batch files (.bat), SQL scripts (.sql), and Linux and Unix shell scripts (.sh for Agentry application purposes) will be configured in this procedure. For shell scripts and batch files the text editor provided with Eclipse will be configured in this procedure. Other tools exist for these types of files as plug-ins to the Eclipse Platform. If those are to be used, review the documentation and instructions provided with those tools for configuration.

  1. Select the Eclipse menu option Window | Preferences.

    This will display the Preferences screen in Eclipse:


  2. In the tree control on the left, select General | Editors | File Associations.

    This will display the File Associations preference page:


  3. In the top list on this page are the file types for which associations can be made. The bottom list contains those editors or tools configured for the file type selected in the top list. File types can also be added to the top list. Begin by selecting the item *.bmp in the top list. The list of associated editors will be empty. Click the [Add...] button to the right of this empty list to create a file association.

    This will display the Editor Selection list, where an internal or external editor can be selected. Here an internal editor will be used.


  4. For a bitmap file you can select the Image Detail editor in this list. Then click the [OK] button to make this selection.

    This returns you to the File Associations preference page, where the Image Detail editor is now configured as the default editor for bitmap files.



  5. Next the remaining file associations can be created. Begin by checking the configuration of .sql files. By default the SQL File Editor is configured as the default for this file type. This is a part of the Data Tools package provided with Eclipse. You may select another editor if one is available, though this is the recommended editor for Agentry application projects.
  6. The remaining file types that may need to be configured are those related to File System connections. These can be batch files for Windows deployments or shell scripts for Linux and Unix deployments of the Agentry Server. By default these file types are not listed in the Preference page for file associations. They can be added. To do this, click the [Add...] button to the right of the File types list.

    This will display the Add File Type screen as shown next.



  7. Enter the file extension in the format *.ext in the field provided and click the [OK] button.

    This will return you to the File Associations preferences page where the new file type will now be listed.


  8. This new file type can now be selected and an Editor can be associated with it, just as before. In the previous example Windows batch files are configured to have the Text Editor as the default editor.
  9. This procedure can now be repeated for any other file types. In the case of Linux or Unix development, the recommended file type of .sh should be added and configured. While the file extensions are not required by these operating system types for proper execution, within the Agentry application project an extension is needed. This is so a file association can be configured for proper display and management of the files.
The file associations for those file types used in Agentry application projects have now been configured. In the examples provided in this procedure the following configurations have been made:
  • Bitmap files will be displayed in the Image Detail editor.
  • Windows batch files will be displayed in the standard Text Editor for Eclipse.
  • Shell script files will be displayed in the standard Text Editor for Eclipse.