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.

Bug 239115

Summary: More formatting options to "Spaces Before Parentheses" category
Product: cnd Reporter: ollika
Component: EditorAssignee: Alexander Simon <alexvsimon>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:

Description ollika 2013-12-04 14:21:43 UTC
I don't usually use parentheses in return statements, but if I do, I want the space there. For example:

  return (this || that);
        ^

But I don't want a space when using the sizeof operator:

  sizeof(Class);

Currently both cases are governed by the "Other Keywords" formatting option in "Spaces Before Parentheses"
category so I can't configure them separately. It would probably be enough just to be able to configure
"return" statement separately.


Also I could not find a way to configure spaces for C++ style casting (const_cast, static_cast,
dynamic_cast, and reinterpret_cast). For example my:

  static_cast<int>(test);

is formatted to:

  static_cast<int> (test);

I think the most commonly used style is to not use a space, but the safest option would be to add a
configurable parameter for these too.
Comment 1 Marc_W 2015-10-13 14:06:03 UTC
Are there any news regarding this feature?