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 135567 - Spaces for the code formatter
Summary: Spaces for the code formatter
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 23:56 UTC by qudus
Modified: 2013-09-02 14:24 UTC (History)
0 users

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 qudus 2008-05-21 23:56:35 UTC
hi

I am not a Netbeans user myself. But people in my project are using it and we're searching for a common coding
guideline. In principle the guidelines are fixed, but unfortunately netbeans is not capable to fulfill a few of them.
Here is a list of the ones, that netbeans cannot do:

1. indent empty lines.
    Netbeans always removes spaces from empty lines. (We're using spaces only. No tabs.) This is quite annoying, since
    We want spaces to be there and removing them means a lot of SVN diffs, which make it quite difficult to track
    the actual changes, if the formatter was used.

2. Spacing array accessors.
    Since we're using spaces after opening and before closing brackets/parenceses, we want array element accessors
    to be spaced, too like this: array[ i ] = 1;

3. Spacing generic types.
    To match the whole concept, we're spacing generic types, too like this:
    public class Foo < T extends Bar >
    ArrayList< Foo > a = new ArrayList< Foo >();
    public < E extends Bar > E doSomething( E e )

4. No space before a parenthese for return and throw.
    We use to perenthese the arguments of return and throw and we don't want a space between the return/throw and
    the opening parenthese like this:
    return( blah );
    throw( new BlaException() );
    I know, this might look uncommon, but Eclipse can do it and it shouldn't be too hard to include it in to the
    NetBenas' formatter, too.

Would be very cool, if NetBeans would also be capable to honor these rules in its formatter. Then we were able to
effectively have a common coding guideline.

Thanks in advance.

Marvin