Using the Command with File I/O Component Template

Follow the steps below to develop a component using the Command with File I/O template.

Before you begin: Before using the Command with File I/O template, you need to create an Isight project using this template (see Creating an Eclipse Project to Store the Extension). In addition, you must complete the tasks as listed in the Eclipse Task view. For more information about the Task view in Eclipse, refer to the Eclipse documentation at http://help.eclipse.org.

For more information, see Internationalizing the Command with File I/O Template.

  1. Implement a custom file reader for the input file, a custom file reader for the output file, and a custom file updater for the input file by implementing the IFileReader and IFileUpdater interfaces. This template provides a working implementation class of these interfaces named BasicFile Reader and BasicFileUpdater. These classes read/update a file containing name-value pairs. You may use these classes directly if they suit your purpose. The two classes support only scalar parameters. They do not support array or aggregate parameters.

  2. Provide instances of a file reader for the input file and a file reader for the output file in the ComponentConfigurer.java file at the indicated place. These custom classes must implement the IFileReader interface.

  3. Provide an instance of the file updater for the input file in the component executor file at the indicated place. This custom class must implement the IFileUpdater interface.

  4. Provide an instance of the file reader for the output file in the component executor file at the indicated place. This custom class must implement the IFileReader interface.

  5. If you are using BasicFileReader and/or BasicFileUpdate, you can specify the delimiter at the indicated place in the Keys.java file. This should be the same delimiter that separates the name and value strings in the text files.

  6. Before building a production version of your component’s jar, set the DO_CLEANUP flag to true at the indicated place in the Keys.java file. This will ensure that the temporary files are deleted when they are no longer required.

  7. The developer may also customize the file filters for input/output tabs by changing the appropriate arguments to the constructor of the FlatParamPanel class in the component editor file.

  8. If you are using Isight 5.5 or later, you may consider overriding the Handler.diffConfiguration() method. This method is used by the model comparison tool to compare the instances of your component in different models. For more information, see the comments in the Handler class.