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.
We have a method which is named "delete" that we're trying to call from JavaFX. The SAFE way to do this is to surround the call with <<>>'s, and that works fine. It turns out the compiler doesn't insist on this when it's obvious you're referring to an API method, so this is valid JavaFX: foo.delete(); If I format code which contains this, then bad formatting happens: Sample: class Foo { public function <<delete>>(): Void { println("test"); } } Foo{}.delete(); Rectangle{} Formatting gives this: class Foo { public function <<delete>>(): Void { println("test"); } } Foo {}. delete(); Rectangle{} (It doesn't looks so bad here -- in my real world case the code was indented more, so I ended up with a screenful of newlines).
I filed this as a P4, but I noticed we have quite a few cases of this in our codebase. There are Java APIs that are named delete. If I use code completion in FX I end up with a call without <<>>'s. def file = new java.io.File(path); file.delete(); (1) We should probably insert <<>>'s when the method you're inserting is a keyword. (2) The formatter should probably handle this specific case (when the usage is clearly an identifier name, not its keyword usage).
fixed http://hg.netbeans.org/javafx/rev/c57c0f0f7dd7 But I still don't understand why do you need FX function to be named by FX keyword? If you invoke java function from FX code you don't need that crazy "<<>>" signs...
verified in NetBeans-JavaFX-Soma: #253