Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 270116 - C++ Template class dialog
C++ Template class dialog
Status: NEW
Product: platform
Classification: Unclassified
Component: Templates
PC Windows 10 x64
: P3 (vote)
Assigned To: Martin Entlicher
cndreq, 82patch-candidate
Depends on:
  Show dependency treegraph
Reported: 2017-03-18 12:58 UTC by youpko
Modified: 2017-03-22 15:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description youpko 2017-03-18 12:58:56 UTC
I am trying to add my own templates via "Options > Tools > Templates". For non c++ class files this works fine.
But when i try to build a c++ class template from copying the and class.h file it works until i restard Netbeans (somethimes not at all).

When i create a new c++ class the IDE shows me the "New C++ Class" dialoge.
But when I try to create my custom c++ class i get the dialoge for only a new cpp file and not for both the c and h files, and the ${CLASSNAME} variable in the template doesn't work either.
Comment 1 Alexander Simon 2017-03-22 15:48:18 UTC
Work around.
- open in editor duplicated class and "Copy file path" (pop-up menu on editor tab header). Remember path.
- exit from IDE
- open in editor (not in NetBeans) file ".nbattr" in the folder where template is located.
- find strings like:
<attr name="templateWizardIterator" serialvalue=""/>
<!-- org.netbeans.modules.cnd.editor.filecreation.CndClassWizardIterator@6f436134 -->
replace it on:
<attr name="templateWizardIterator" newvalue="org.netbeans.modules.cnd.editor.filecreation.CndClassWizardIterator"/>
- Start IDE.
Comment 2 Alexander Simon 2017-03-22 15:51:24 UTC
Duplicate template does not set right "templateWizardIterator" attribute.
Reassign to evaluation.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo