Using the propertyeditor.xml File
The client obtains the details about the resources to load and run from the .propertyeditor.xml file. For example, if you use the APE “Locator ChangeRequest”, the file ChangeRequest.propertyeditor.xml is read by the client to determine which resources are deployed for the APE. Below is a copy of the sample ChangeRequest.propertyeditor.xml file included with the StarTeam Extensions:
<?xml version="1.0" encoding="UTF-8"?><propertyeditor name="Change Request Editor" version="1.1"> <itemeditor class="com.starbase.starteam.changerequest.ChangeRequestEditor"> <jar name="ChangeRequest.jar"/> <jar name="guicomponents.jar"/> <jar name="starflow-extensions.jar"/> </itemeditor> <javaclass name="com.starbase.starteam.changerequest.ChangeRequestLauncher"> <jar name="ChangeRequest.jar"/> <jar name="guicomponents.jar"/> <jar name="starflow-extensions.jar"/> </javaclass></propertyeditor>
The name of the .propertyeditor.xml file is passed to the client in the Project Properties dialog, for example, “Locator ChangeRequest”. The client finds this .propertyeditor.xml file and determines which resources are needed for this APE.
The <javaclass> element identifies the Java class that acts as the entry point for the APE. The name attribute names the class and the <jar> subelements name the jar files that implement the editor. The named jar files are located in the StarFlow Extensions project in the same manner as the .propertyeditor.xml itself, allowing for overriding in a similar manner. These jars are checked out of StarTeam and loaded into the Java Virtual Machine before the main method of the named entry point class is called.
The <external> element contains the default command and any operating specific commands that may be needed. The <command> element includes a platform option that names the operating system and a call option to indicate the executable to call on the target platform. Within the <command> element are the parameters to pass to the executable specified on the call option. The format “${resource:<file>}” is used to tell the client that the <file> is to be located by using the standard logic for locating a resource in the StarFlow Extensions project, that is by searching for a folder with the view name and then the project name and, if not found, finally using the default files found in the Projects folder.