views:

300

answers:

1

I have a comment template in Eclipse (CDT) that I use for function calls which looks like:

//****************************************************************************
//
// Function: ${enclosing_method}
//
// Purpose:  
//
// Parameters:
//
//****************************************************************************

My problem is that the ${enclosing_method} template variable doesn't work MOST of the time, but other times it does and I have yet to figure out why. I've tried using the comment template inside of the function and outside (on top of) the function definition even within the same header file. I prefer it to be on top and have seen it work in that position but again I don't know why.

What prerequisites need to be met in order for the enclosing_method variable to place the name within the comment automagically?

Thanks in advance for any insight you can provide.

+2  A: 

You are not the only one experiencing issues with this template.
Even in JDT (Java) there is a problem, since 2004! See bug 76661.

It is however not entirely reproducible.

Looked into this to try and find a reproducible case. I can get it happen consistently if I add a new method to a class and then execute the template inside of the method before saving

So far, no patch in sight.

VonC