|
Studio provides a way to start different executable programs existing in the system, from inside Studio and work with each one of them in a parallel process. This feature is called Named Runs. This chapter describes the procedure to configure the executables and also run them.
To run any external executable program from inside Studio, the information required has to be first configured. These configurations are then used to run the executables. The maximum number of executables that can be set is nine.
To configure the named runs, click on Build > Run Configuration from the main menu. This brings up the Named Run panel.
Fill the following information here:
Name Enter a name that is to be used to run the executable from inside Studio. This field is mandatory.
Command Enter the complete path of where the executable file is located in the system. The browse button can also be used to locate the file. This field is mandatory.
Working Directory Enter or browse for the working directory in this field. The working directory specifies the location from where the named run is to be executed. This field is optional.
Arguments Enter the arguments to be used to run the executable here. There are various argument strings provided by the Run tool, which are dynamically changed just before executing the named run. Each of such argument strings can be selected by using the drop down menu along side the "Arguments" field or can be entered in the field manually. The argument strings get appended to the "Arguments" field on selection from the drop down menu.
Hide Output Panel on Exit Checking this option hides the Output Panel when the running executable is exited only in case the Output Panel was hidden before the executable was started. This option is unchecked by default.
Prompt for Input Checking this option always prompts the user for an input before executing the named run. The message typed when prompted is then appended to the text in the Arguments field, provided during configuration.
Example
When the named run is a browser and the option Prompt for Input has been checked, executing the named run pops up a panel and prompts the user for an input. Entering a site name here opens the browser with the specified site as the home page.
Use the Add button in the Named Run panel to add the named run that has just been configured.
To modify an existing named run, open the Named Run panel and select the named run to be modified using the dropdown menu in the Name field. Make the required changes to the named run and click on Modify.
To delete an existing named run from the list of named runs in Studio, open the Named Run panel and select the named run to be deleted using the dropdown menu in the Name field and click on Delete.
The following tasks can be performed using the arguments available inside Studio:
Open File Name The corresponding argument string is "$FILE_NAME". The complete path of the file, which is already open in the editor, replaces this string just before executing the Named Run.
Selected Desk Node File Name The corresponding argument string is "$DESK_NODE_NAME". The complete path of the file selected in the Desk, replaces this string just before executing the Named Run.
Open File Class Name The corresponding argument string is "$FILE_CLASS_NAME". The class name the file, which is already open in the editor, replaces this string just before executing the Named Run.
Selected Desk Node Class Name The corresponding argument string is "$DESK_NODE_CLASS_NAME ". The class name the file selected in the Desk, replaces this string just before executing the Named Run.
Open File Classpath The corresponding argument string is $FILE_CLASSPATH. The classpath associated with the file, already open in the editor, replaces this String just before executing the Named Run.
Selected Desk Node Classpath The corresponding argument string is "$DESK_NODE_CLASSPATH". The classpath of the file selected in the Desk, replaces this string just before executing the Named Run.
System Classpath The corresponding argument string is "$SYSTEM_CLASSPATH". The classpath of the studio, replaces this string just before executing the Named Run.
Open File Output Dir The corresponding argument string is $FILE_DIR. The full path of the output directory associated with the file, already open in the editor, replaces this string just before executing the named run.
Selected Desk Node Output Dir The corresponding argument string is "$DESK_NODE_DIR". The target directory of the file selected in the Desk, replaces this string just before executing the named run.
Desk Dir The corresponding argument string is $DESK_DIR. The full path of the directory of the active Desk replaces this string just before executing the named run.
Module Dir The corresponding argument string is $MODULE_DIR. The full path of the directory of the currently selected module replaces this string just before executing the named run.
Project Main Class The corresponding argument string is $PROJ_MAIN_CLASS. The full path of the project main class of the active Desk replaces this string just before executing the named run.
Running a Named Run as a parallel process starts a tab of that named run in the Output Panel. This tab comprises of two sections - the Output Panel itself and the input Text Field. To close the tab, right click in the Panel and select Close.
All output messages of the running application are displayed in the Output Panel. The messages in this panel cannot be edited. To clear all the messages displayed in the Panel, right click anywhere in the Panel > Clear.
The Input Text Field appears in the lower half of the respective tab in the Output Panel. This field is used to enter any inputs to be provided by the user. The text entered in this field is treated as the standard input required by the program.
| Pramati Technologies © Copyright |
|