History | Edit

A command-line tool can be started in the Oxygen XML Editor user interface as if from the command line of the operating system shell. Oxygen XML Editor offers you the option of integrating such a tool by specifying just the command line for starting the executable file and its working directory. To integrate such a tool, open the Preferences dialog box (Options > Preferences) and go to External Tools (or select Configure from the Tools > External Tools menu).

The External Tools preferences page presents a list of the external tools that have been configured. Once a tool has been configured, you can open it by selecting it from the Tools > External Tools menu or from the External Tools drop-down menu on the toolbar (the Tools toolbar needs to be selected in the Configure Toolbars dialog box). You can also assign a keyboard shortcut to be used to launch the tool.

If the external tool is applied on one of the files opened in Oxygen XML Editor, the Save all files before calling external tools option (in the Open/Save preference page) should be selected so that all edited files are automatically saved when an external tool is applied.

When an external tool is launched, the icon on the toolbar changes to a stop icon () and you can use this button to stop the tool. When the tool has finished running (or you close it), the icon changes back to the original icon ().
Note: Even though you can stop the external tool by invoking the stop action while it is running, that does not necessarily mean it will also stop the processes spawned by that external tool. For instance, if you stop an external tool that runs a batch file, the batch may be stopped but without actually stopping the processes that the batch was running at that time.

Example: Integrating the Ant Tool

This is an example procedure for integrating the Ant build tool into Oxygen XML Editor:
  1. Download and install Apache Ant on your computer.
  2. Test your Ant installation from the command-line interface in the directory where you want to use Ant from. For example, run the clean target of your build.xml file C:\projects\XMLproject\build.xml:
    ant clean
  3. Open the Preferences dialog box (Options > Preferences) and go to External Tools (or select Configure from the Tools > External Tools menu).
  4. Click the New button to create a new external tool entry and enter the following information:
    • Name - For example, Ant tool.
    • Working directory - For example, C:\projects\XMLproject.
    • Command line - For example, "C:\projects\XMLproject\ant.bat" clean.
  5. Click OK to add the new tool to the list of external tools.
  6. Run the tool from Tools > External Tools > Ant tool. You can see the output in the system console:
        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