Download size: 0.01 MB
Last Update: 2010-06-30
This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin
What's new in this version
New version, containing 2 more hints and improvements to the implicit type hint (now has autofix, and won't report issues on implicit types with generics or type bounds)
Verifications for NetBeans versions
Decisions of individual verifiers for JavaFX Extra Hints plugin for NetBeans IDE 6.9
Extra hints and quickfixes for JavaFX. Currently contains three rules:
(1) Make sure that all non-private functions specify an explicit return type.
This is a good rule to follow because without it you can easily end up with unintended return types (for example, when you intend for a public function to have return type void, but your last statement *happens* to have a type, say of type Number. Now, a subclass wishing to override this function will need to return a Number!
Another, simpler, example is where you for example return "5" from a method and you really intended for it to have return type Number, but since you entered "5" and not "5.0" the inferred type is Integer, and any subclass returning say 4.2 will force rounding.
(2) Detect and fix bound variables.
If you have a variable that is bound, this is a runtime exception waiting to happen (AssignToBoundException). Once you bind the value of a variable, you should make it read only (a def) such that you don't attempt to set it. This hint detects these cases for you and has a fix to correct the code automatically.
(3) Avoid calling BufferedReader.readLine from JavaFX.
JavaFX treats the empty String, "", and null, as identical. This makes it very easy to write incorrect code using BufferedReader.readLine (since it returns null to mean end of file and "" to mean empty line - and JavaFX can't tell the difference). There are many bugs where people have tried reading files etc only to find out that the input is cropped at the first blank line.