idl2src intends to make it easier to visualize and understand IDL and GDL codebases, using the Sourcetrail open-source code visualization program. idl2src uses the GDL parser's intermediate debug output to generate information about an IDL/GDL codebase, and uses this information to construct a Sourcetrail graph for easy visualization.
idl2src is written in C++17 and contains an object-oriented architecture to carry
data between the two parts of the program. The first part, parsegdl.cpp, parses
the text files generated by GDL's debug functionality. The second part,
parsestructs.cpp uses the code-friendly structures created by parsegdl in
order to commit to a Sourcetrail database the symbols created by parsegdl.cpp.
idl2src is written for Linux applications at this time, and requires a c++17 compiler. The dependencies for the idl2src binary are as follows:
- c++17
- make
- gdl with debug output enabled
idl2src is intended to be used within Sourcetrail using its custom source group
functionality. To use idl2src to index an IDL/GDL codebase, the following things
must be done:
- build & install
gdlwith theGDL_DEBUGmacro indinterpreter.cppuncommented - build
idl2srcby runningmakefrom this directory - copy
idl2srcandrun_indexer.shto the codebase you want to index
From here, all that is required is to setup the project within Sourcetrail:
- create a Sourcetrail project in the desired directory
- create a new Sourcetrail source group and select "Custom Command Source Group" in the "custom" tab
- enter
bash ./run_indexer.sh %{SOURCE_FILE_PATH} %{DATABASE_FILE_PATH}into the Custom Command entry box - enter
./(or whatever files you want to index) in the "Files & Directories to Index" entry box - enter ".pro" into the "Source File Extensions" entry box
After this is complete, you should be able to index your Sourcetrail project after exiting the setup menu.