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 189414 - JavaFX formatter messes up bound functions
Summary: JavaFX formatter messes up bound functions
Status: RESOLVED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P2 normal (vote)
Assignee: Anton Chechel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 19:42 UTC by GrahamM
Modified: 2010-08-13 14:48 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 GrahamM 2010-08-11 19:42:28 UTC
Whenever I have a bound function, so a function definition that starts

    public bound function ...

the formatter goes crazy when I reformat the code. It totally messes up the code to the point where it actually introduces syntax errors -- the code won't compile after formatting.

It appears that formatter is not aware of the JavaFX reserved word "bound".
Comment 1 Alexandr Scherbatiy 2010-08-13 07:38:24 UTC
Format the code:
-------------------------------------------
class A{
var x = 3.0;
public bound function addX(y:Number):Number{
    x + y;
}
}
-------------------------------------------

The result is 
-------------------------------------------
class A {

    var x = 3.0;

    public   boundfunction  addX   

(y:Number):Number{
    x + y;
}
}
-------------------------------------------

Main.fx:11: Sorry, I was trying to understand a 'class' declaration member but I got confused when I saw 'boundfunction' which is an identifier.
    public   boundfunction  addX
Main.fx:15: Sorry, I was trying to understand the script contents but I got confused when I found an extra '}' that should not be there.
}
2 errors
Comment 2 Anton Chechel 2010-08-13 14:48:04 UTC
fixed
http://hg.netbeans.org/javafx/rev/e2a66722604c