7

I'm looking for a faq or overview on C/C++ template-file variables in Netbeans (7.0). (Not to be confused with the template technique). Those you see under Tools > Templates > C++ templates.

e.g.

%<%CLASSNAME%>%  %<%DEFAULT_HEADER_EXT%>%  %<%DATE%>%

which are automatically filled when you create a new cpp/header file out of that file-template.

The help for the Java template-variables with Freemarker is very extensive, but I found nothing for the C++ equivalent.

When I did a search on CLASSNAME DEFAULT_HEADER_EXT, google gave me 5 results... which were not helpful. So if there is a reference or api, it seems to be hidden somewhere... Not even the netbeans site had any information about that.

And if there is nothing, maybe someone can at least tell me if there is a way to format the %DATE% variable (like this in Java's Freemarker format: ${date?date?string("yyyy")} ).

Still no luck... can't believe that such a feature is not documented... Any help would be appreciated :)

Thanks

Kirschi
  • 1,088
  • 3
  • 12
  • 32
  • 1
    I suspect few if any of the C++ experts here use NetBeans (or Eclipse). OK for Java programming, but for C++? Nah. –  May 18 '11 at 19:24
  • Yea I know it's not "standard", but Visual Studio is just making problems on my system. The C++ support in netbeans is really good (now), except of that template thing. And other editors are not an option for me (personal taste ;-) ). – Kirschi May 18 '11 at 19:31
  • 2
    Docs don't exist yet. An issue has been filed https://netbeans.org/bugzilla/show_bug.cgi?id=198793 – Jonathan Spooner Oct 24 '11 at 03:49
  • @Kirschi: Have you tried QtCreator? –  Oct 05 '12 at 12:39
  • sorry for the late answer... I wasn't aware until now that you can code in C with QtCreator. But I guess it doesn't matter - I love netbeans. I tried a lot of different IDEs but netbeans is the one and only one ;) I guess I have to live with it or wait until there is Freemarker support. – Kirschi Nov 19 '12 at 20:08

1 Answers1

0

I know it's an old question but just stumbled on it and think it's good to have it mentioned:

The documentation of all predefined template variables including the date formatting may be found here: http://wiki.netbeans.org/FaqTemplateVariables

AD-530
  • 1,059
  • 9
  • 9
  • Thank you for your answer but I already knew this site. What I really wanted was a way to modify those variables like shown above. I am not happy with the _date_ format. – Kirschi Nov 19 '12 at 19:56