I often need to find out which functions are getting called in a C++ file. I am using Eclipse 3.7.0. The C++ file may be huge. I want to write a plugin which will detect the beginning of a function and insert a
std::cout << "Function Name called !!" << std::endl
at the beginning in the code editor window. I think eclipse already detects functions since it does display the entire file structure in the Outline view. I would like to use this information to inject the cout statements. The 'Function Name' part should be replaced by the actual function name in the definition part of the function.
Is this even possible ? Where would I start ?
It would be even more awesome if I could insert couts automatically into all functions which call a particular function(say the one the cursor is in).