Now it is possible to create your own custom command to run under Kawa. This opens up new horizons for the kind of things that can be done with Kawa. In order to use a custom command under Kawa it is important to create the command first. This is done by selecting Customize/Commands menu option from the main menu. This will display a dialog as shown in the figure below. Any custom command added to Kawa will be listed under Customize menu at the end and optionally on the right button menu for a file item or a project item in the project tree. This is very powerful. Please refer to Custom Command parameters for a discussion on various custom parameters defined under Kawa.
Finally, all the customized commands are stored in a file called USER.CMD in the Kawa directory. It is important to set the program path under Customize/Directories path to Kawa directory for this file to be found.
Most dialog items are self-explanatory. Here is a run down of the different controls in the customize commands dialog. The list box in the top lists all the custom commands currently defined under Kawa. The name appears as is in the menu. If you want a quick access character to the menu please precede the character with an ampersand character as shown in the figure above.
Move Down and Move Up can be used to rearrange the commands in the listbox to set the order of the commands.
Delete will delete the command from the listbox.
In the details groupbox Menu name is the name of the menu. Command is the location or path of the command to run. Clicking on the browse button next to the field can pick the file or it can be typed in. This command name is passed as is while running this command.
Startup directory is the location where the command will be executed. The location can be picked from a directory picker dialog or it can be a variable parameter. Variable parameter can be picked by clicking on the button marked ">>" next to the startup directory field. Please refer to Custom Command parameters for a detailed discussion on various parameters available.
Argument fields are where you pass the arguments to the command. Everything is taken literally except the custom parameters which are enclosed within <> blocks and parameter prompting which are enclosed between ?? blocks. These parameters are substituted with appropriate values during execution of the command. Please refer to Custom Command parameters for discussion on various parameters available under Kawa.
Set Projects interpreter classpath when checked will read the classpath defined under Root projects Interpreter options and set that as the classpath before executing the custom command.
Input Output Redirection -
Do not use Output Window prevents any window from appearing inside Kawa when you launch a custom command. This would be used for commands that produce their own output window.
Redirect input and output to Window will redirect both input and output from custom command to a MDI client window within Kawa. This will enable you to see the output and also provide you with an option to kill the process if desired. Please refer to How to monitor custom commands for more details on output window redirection from custom command. If output window is not redirected Kawa does not provide you with any options to monitor the child process or kill the process.
Redirect output only to output window will redirect the output to the standard output window but with no input redirection. This could be useful to setup custom compiler commands etc.
Redirect output to file will redirect the output to the file typed in the output file field. The field can be composed of a directory and filename or these values can be prompted for and command execution time.
Add command to File Item right button menu in the project tree will add this command to the right button menu of a file item in the Project tree. Only first 10 items are added to the menu.
Add command to Project Item right button menu in the project tree will add this command to the right button menu of a project item in the Project tree. Only first 10 items are added to the menu.
Add command to right button in editor menu now allows menus to be specifically added to the context menu of the editor window. This has now been separated from the File Item right button click. Only the first 10 items are added.
By specifying a file extension for the command, that command will now only be applied to files with that extension. Only one extension may be entered. The command will not show up in the right click menu if the extensions do not match. This field can only be used if the project, file or editor placement selection is made.
Please note the custom commands will not show up in any menu until it has a name field and the command field filled.