8.17.1 Configuring Tools
Tool configuration helps us to run any tool from Bean Builder. The user can run the tool from Bean Builder by giving required commands in the Tool Configuration dialog. Select Tools --> Configure Tools menu-item to invoke Tools configuration dialog as shown below.
In the dialog shown above , you can specify all the information that is necessary to run the tool from the Bean Builder.
Enter the tool name in the Menu text-field.
In the section for Command, enter the command that is necessary to run the tool. Ensure that you do not remove the "$" and "%" symbols as the Bean Builder uses these to replace the filename, CLASSPATH .. etc.
Append the Variables as required.
The JAVA_HOME takes the location of the JAVA_HOME directory.
FILENAME is the name of the source file along with its full path that is currently open in Bean Builder.
DIRECTORY is by default <Web NMS Home>/Projects/<your project>.
CLASSPATH is the classpath of the current screen.
CLASSNAME is the classname without the .class extension
SCREEN_NAME is the name of the current screen.
PROJECT_FILE is the project (.proj) file.
Specify the execution details as per your requirement.
The user can view the configuration details in Tools.config file under the <Web NMS Home>/builderconf directory. The Auto-Execute options in the Tools.config file can be interpreted as follows :
"0" refers to "No Auto-Execute"
"1" refers to "After Source Generation"
"2" refers to "Before compilation"
"3" refers to "After compilation".
Consider the following examples
run Netscape from the Bean Builder
Enter the tool name as NetScape
For command, enter "netscape $%FILENAME%$".
You can set the Auto-execute Options to be "No Auto Execute". Clicking on "Ok" adds "Netscape" to the Bean Builder "Tools" menu. Now, you can run Netscape from the Bean Builder itself to view the current file.
This lists all the public methods and public variables.
Enter the tool name as "javap".
For command, enter "javap $%CLASSNAME%$".
Set the Auto-execute Options depending on your requirement.
Clicking on "Ok" adds "javap" to the Bean Builder Tools menu.
Now, you can run "javap" from the Bean Builder itself to view the public methods and public variables.