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

Summary: Space is added before parameter list even if the list is empty (void)
Product: java Reporter: duplicitous <duplicitous>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

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());