Using the Eclipse User Interface for Abator

See the Quickstart Guide for a quick start!

The Abator user interface consistes of these elemsnts

Configuration File Editor

The configuration file editor is a low function editor. In this release, it only provides enough functionality to be somewhat better than a plain text editor (like some color syntax hilighting). In future releases we hope to add more function to this editor. If you have some better XML file editor available in your environment, it will likely be a better than this editor. The editor is useful in a very basic Eclipse installation which has no other XML editor.

The editor is automatically associated with files named "abatorConfig.xml". If you are using a very basic Eclipse install, you might consider associating this editor with any XML file. In the Eclipse 3.1 version of the plugin, we will associate the editor with any Abator configuration file, regardless of the file name.

New Configuration File Wizard

The new configuration file wizard will create a new XML file with a basic outline of a configuration file for Abator. You do not need to use this wizard, but it is useful for setting up a new configuration file.

You can access the wizard from the menu: "File>New>Abator for iBATIS Configuration File"

Run Abator Action

The run Abator action is the heart of the Eclipse user interface. The plugin will add a popup menu option called "Generate iBATIS Artifacts" to any XML file that has the root element of "abatorConfiguration". To run Abator, right click on an Abator configuration file in any view and select the menu option.

Integrated Ant Task

The Abator plugin declares an Ant task for use within the Eclipse JRE. The task is called "abator.generate". Here is en example Ant build file:

  
<project default="runAbator">
  <target name="runAbator">
    <eclipse.convertPath resourcepath="AbatorTest/src/config/abatorConfig.xml" 
                         property="thePath"/>
    <abator.generate configfile="${thePath}" />
  </target>
</project>  

This file uses the Eclipse supplied "eclipse.convertPath" task to calculate the actual path of the configuration file. Then we use the "abator.generate" task to run Abator. The only thing to remember when running this from Eclipse interactively is that the Ant launch must be setup to run in the same JRE as the workspace. This setting is a standard configuration setting for running Ant in Eclipse.