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 184073

Summary: The formatter inserts a space between "function" and "()" in an anonymous function
Product: javafx Reporter: Torbjorn Norbye <tor>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173487    

Description Torbjorn Norbye 2010-04-13 20:10:51 UTC
By default the JavaFX formatter seems to format this code:
    action: function() {

into this:

    action: function () {

In other words it adds a space between "function" and "()" for anonymous functions.

That's a bit unusual (and I don't see ANY occurrences of that formatting anywhere in the SDK source code).

Note that I looked at the JavaFX formatting options, and the option for adding a space before the function call parentheses was false.

I'm guessing the formatter is simply inserting the space that usually separates the function keyword and the function name, without checking whether there is a function name to be separated from the keyword.
Comment 1 Anton Chechel 2010-04-15 12:05:21 UTC
fixed
http://hg.netbeans.org/javafx/rev/4216e08e3534
Comment 2 Alexandr Scherbatiy 2010-04-20 07:27:06 UTC
verified in NetBeans-JavaFX-Soma: #227