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 136082 - Space is added before parameter list even if the list is empty (void)
Summary: Space is added before parameter list even if the list is empty (void)
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-29 12:59 UTC by duplicitous
Modified: 2008-06-06 10:38 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 duplicitous 2008-05-29 12:59:52 UTC
I find it nice to have the editor supply me with the option of altering its
Code Auto-Completion feature so as to add a (single) space before a method's
parameter list.

It wouldn't hurt, however, to qualify this option further by a sub-option
like: (a) "Don't insert space(s) before empty parameter list" and/or maybe
also (b) "Only insert space for last member in chain." or something along
those lines.

By ways of illustration...

The current option would enforce constructs as such:

    int size = list.getModel ().getSize ();
    System.out.println (size);

This obviously does not read as well as (example for sub-option (a) ):

    int size = list.getModel().getSize();    // No spaces in front of void parameter list.
    System.out.println (size);               // Space in front of non-void parameter list.

Also the currently enforced construct:

    System.out.println (list.getModel ().getElementAt (index).toString ());

would be more nicely formatted as (example for sub-option (b) ):

    // A space only before the Last Element In Chain's parameter list .
    System.out.println (list.getModel().getElementAt(index).toString ());

The two options could be combined so as to auto-format the last line of code above
to:

    // A space only before the Last Element In Chain's parameter list,
    //  provided that it is not empty.
    System.out.println (list.getModel().getElementAt(index).toString());