How can I get a class name to be used as a variable in Netbeans Code Templates?

Viewed 39

Hello I'm trying to write a C++ Code Template which allows use .h or .cpp file name as a name value.

For example I have ClassA.cpp:

#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
#include <cstdlib>
#include <cstring>

#include "ClassA.h"

ClassA::ClassA() {

}

I wrote a Code Template using NetBeans IDE:

${TIP default = "void"} ${MET}( ${ARGS default = "void"} ); 

${TIP} ${CLASS default = "Cls"}::${MET}(${ARGS} ) {
   ${selection}${cursor} 
}

Using this template I can change all names and types, but I want to avoid write ${CLASS default = "Cls"} and get "ClassA" (Or any name which .h and .cpp files have when I use this template code) instead of "Cls".

How I can do that?

0 Answers
Related