Integrating external tools

When your XML project requires to run an external tool different than a FO processor and which can be launched from the command line <oXygen/> offers you the option of integrating the tool by specifying just the command line for starting the executable file of the tool and its working directory. To integrate such a tool go to OptionsPreferences+External Tools

If the external tool is applied on one of the files opened in <oXygen/> you should enable the option for saving all edited files automatically when an external tool is applied.

External tools can be launched from the External tools toolbar or from the submenu ToolsExternal tools. While the action is running its icon is a stop icon: . When the tool has finished running it will change the icon back to the original run icon: . Please note that even though you can stop the external tool by invoking the action again while it is running, that doesn't mean you can also stop the processes spawned by that external tool. This is especially a limiting factor when running a batch file as the batch will be stopped but without actually stopping the processes that the batch was running at the time.

 Integrating the Ant tool

As example let us integrate the Ant build tool in <oXygen/>. The procedure for this purpose is:

 
  1. Download and install Ant on your computer.

  2. Test your Ant installation from the command line in the directory where you want to use Ant from <oXygen/>, for example run the clean target of your build.xml file C:\projects\XMLproject\build.xml: ant clean

  3. Go to OptionsPreferences+External Tools

  4. Create a new external tool entry with the name Ant tool, the working directory C:\projects\XMLproject and the command line "C:\projects\XMLproject\ant.bat" clean obtained by browsing to the ant.bat file from directory C:\projects\XMLproject

  5. Run the tool from ToolsExternal ToolsAnt tool. You can see the output in the Command results panel:

        Started: "C:\projects\XMLproject\ant.bat" clean
        Buildfile: build.xml
        
        clean:
        [echo] Delete output files.
        [delete] Deleting 5 files from C:\projects\XMLproject
        
        BUILD SUCCESSFUL
        Total time: 1 second