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 - The formatter inserts a space between "function" and "()" in an anonymous function
Summary: The formatter inserts a space between "function" and "()" in an anonymous fun...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks: 173487
  Show dependency tree
 
Reported: 2010-04-13 20:10 UTC by Torbjorn Norbye
Modified: 2010-04-20 07:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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