This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In Tools->Options, Editor node, Code Templates tab, the C/C++ entry under Language is "cc". First off, shouldn't we have entries for both C and C++? Next, shouldn't they be "C" and "C++"? The "cc" string doesn't seem very user-friendly!
this is NB problem. Languages are hardcoded in NB see http://www.netbeans.org/issues/show_bug.cgi?id=89447 *** This issue has been marked as a duplicate of 79599 ***
Reopening with a modified summary. The original summary made it look like a duplicate of 79599 but the description also stressed the importance of splitting C and C++ into separate language settings. The new summary focuses on that. I'll also add 79599 as a blocker to this IZ.
Not everywhere we need splitting. Let's minimize this issue to Code Templates. But in fact we need 3 settings: "C and C++", "C" and "C++" parts. "fori" for C++ should be like: for (int i = 0; i < |; i++) { } and for C it should be: int i; for (i = 0; i < |; i++) { } while "re" is the same for both and expands into "return" So, 3 types of Options for 2 supported languages: - C and C++ Common Options - C specific Options (with inheritance from "C and C++" and possible overrides) - C++ specific Options (with inheritance from "C and C++" and possible overrides)
I am not sure how to solve it and it probably won't be an easy fix. You certainly could have two different mime types and provide a different set of code templates for each of them, but the current implementation of Tools-Options does not support any sort of inheritance of code templates between mime types. Anyway, I am not actually sure that this is suitable for you, because then you would need to treat C and C++ files as different mime types with all the implications. You can't simply fork code templates and share the other settings.
C and C++ files are different mime types. But I'm not actuall sure which of several sub-issues you're referring to. Are you saying you can't (easily) split cc into C and C++? or are you saying you can't split it into the 3 groups Vladimir V suggested? Personally, I'm more interested in splitting into C and C++ categories than in having those 2 plus a compibed one.
Gordon, I think we need consistency and do not break usability. In case of splitting on two, I think it is not usable to configure each time twice font&colors. Splitting on two only is possible on implementation level but needs a lot of Copy&Paste, because settings are not sharable between mime types.
it was split on two (C, C++) and we decided it's OK