I want to save the control flow graph produced by eclipse-cdt codan from some C source code as png/jpeg files. I am using codan as a library in my code so it's not an eclipse plugin. So far I have been able to successfully get the cfg using the code below.
CASTFunctionDefinition def = (CASTFunctionDefinition) function.getPhysicalNode().getParent(); //function is of CFunction type
ControlFlowGraphBuilder builder = new ControlFlowGraphBuilder();
builder.build(def);
Doing so, I have a builder
containing the control flow graph nodes. The question is how I can get the an ouput image of this graph. the codan
library includes a org.eclipse.cdt.codan.ui.cfgview
in it. But I couldn't find any solution for my problem. I found the files in cfgview heavily dependent on Eclipse workspace and environment.