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.
Hello all... 1) Formatting of pointers and references - now NetBeans format pointers and references by different ways. As example if i define method with references in arguments, NetBeans format it like this: void someMethod(const string& s1, const string & s2) // Additional space before & i think it will be greate if user can set how this code should be formatted (possible variants are string& s1, string & s1, string &s1). Also this point can be applied to pointers and rvalue references. 2) Formatting of template functions - now NetBeans format using of function std::get from c++11 standard like this: std::get< 0 >(some_tuple), but i expect wormatting without spaces around zero.
rvalue reference have always space both sides. so it's looks like Logical AND operator.
I think this bug is in the C++ parser... If somebody can tell me where in NB source tree parser (and code model) is placed and how is it implemented (generated via Antlr, handwritten or generated via other tools), i can try fix it...
you are welcome to try and fix cnd.editor/src/org/netbeans/modules/cnd/editor/reformat/ReformatterImpl.java make sure that all tests for cnd.editor passes after that and add more for fixed constructions
fixed problem 2, change set: http://hg.netbeans.org/cnd-main/rev/4f4577f2b675
Integrated into 'main-golden', will be available in build *201210110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4f4577f2b675 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed mentioned problems in the RFE #216290 - Enhance code formatting
Looks like NB does not reformat spaces around & in parameters declaration.