|
|
|
|
|
The tree_js_2_script.pl perl program is used in conjunction with Doxygen to create a tree.script file from a Javascript file.
Doxygen has a configuration option called GENERATE_TREEVIEW. When this is enabled, it creates two files:
treeview.js is a general Javascript application that is referenced in the Doxygen output. It contains the routines required to have folders and topics that provide an expandable/collapsable table of contents in a left-hand navigation frame.
tree.js is a Javascript file with data specific to the project. The treeview.js acquires its expandable/collapsable content from the tree.js file.
Under normal circumstances, the treeview.js and its associated tree.js data could have been re-used and re-purposed in the other settings, instead of searching for another solution, such as the Java TOC Applet.
I did have some experimental tools that could combine the tree.js files from several sub-projects into a comprehensive one. The problems were that the Netscape Navigator didnt like the treeview.js at all and that Microsoft Internet Explorer would issue memory warnings as the tree.js content increased.
Still, the overall structure of the tree.js file from Doxygen was commendable. When the Java TOC Applet was discovered and its script files researched, a design decision was made to simply convert from the Javascript format needed for treeview.js into a script format needed by the Java TOC Applet.
The tree_js_2_script.pl is usually called from within the 35_gen_dox.b shell script, right after it performs the Doxygen build.
Caution! The tree_js_2_script.pl perl program is heavily dependent on Doxygen and the assumptions and formats in the output tree.js file.
The tree_js_2_script.pl perl program takes the following input arguments.
path_to_tree the directory wherein the tree.js files can be located.
name_of_input a relative path and name for the input javascript file. This is usually the tree.js file.
name_of_output [optional] a relative path and name for the output script file suitable for the Java TOC Applet. If this is not provided, the name_of_input is used but has its extension changed to .script.
The tree_js_2_script.pl perl program requires access to globe.pm for variable definitions.
The tree_js_2_script.pl perl program is not very complicated, which is why it is not commented or documented very well (at this point in time. It is heavily dependent on Doxygen and the assumptions and formats in the output tree.js file.
The tree_js_2_script.pl perl outputs a script file suitable for the Java TOC Applet.
|
|
|
Open-Source tools compliments of Voyant Technologies, Inc. and Glenn C. Maxey.
01/13/2003
TP Tools v2-00-0a
# tpt-hug-02