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 124169 - Formatter Defaults for "Code Conventions for the Java Programming Language"
Summary: Formatter Defaults for "Code Conventions for the Java Programming Language"
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 4 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 23:38 UTC by bondolo
Modified: 2012-09-17 08:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bondolo 2007-12-17 23:38:05 UTC
There are currently some differences between the style used by the NetBeans Java formatter and the coding conventions
documented in:

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Could either the NetBeans defaults be changed to conform to the long standing JavaStyle defaults or a "Set to JavaStyle
Defaults" button be provided? 

It's not that I personally agree with the JavaStyle format chapter and verse but I'm hoping this can help solve some of
the ongoing styler + version control wars (wherein everyone applies their styler to code they edit and then check it in
resulting is many minor changes due only to styler setting differences).
Comment 1 Dusan Balek 2009-07-30 14:58:10 UTC
Could you please describe particular differences from Java Style defaults. Thanks.
Comment 2 bondolo 2012-09-14 17:14:57 UTC
Section 8.2: Casts should be followed by a blank space.

http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-141388.html#682

Currently NetBeans defaults to no space after a cast.
Comment 3 Dusan Balek 2012-09-17 08:37:53 UTC
Should be fixed in the current dev build.