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.
Steps to reproduce: - Create Echo JavaFX Script class: ---------- Echo.fx ------------------ public class Echo { public attribute message: String ; } --------------------------------------- - Create Main JavaFX Script file: ---------- Main.fx ------------------ Echo{ message: "Hello World!"} --------------------------------------- - Hold <Ctrl> and click on 'message' attribute in 'Echo{ message: "Hello World!"}' line The IllegalArgumentException pops up: java.lang.IllegalArgumentException at org.netbeans.api.javafx.editor.ElementOpen.encodeType(ElementOpen.java:365) at org.netbeans.api.javafx.editor.ElementOpen.createFieldDescriptor(ElementOpen.java:415) at org.netbeans.api.javafx.editor.ElementOpen.getSignatures(ElementOpen.java:297) at org.netbeans.api.javafx.editor.ElementOpen.openThroughJavaSupport(ElementOpen.java:264) at org.netbeans.api.javafx.editor.ElementOpen.open(ElementOpen.java:125) at org.netbeans.modules.javafx.editor.GoToSupport$1.run(GoToSupport.java:172) at org.netbeans.modules.javafx.editor.GoToSupport$1.run(GoToSupport.java:121)
Created attachment 63666 [details] IDE log file
Go to Petr.
Hmm, again another case where compiler has hard times resolving foreign symbols correctly. For the "message:" part, the compiler will correctly recognize that it is a field (attribute) of the class Echo, that it is named "message", but it can't evaluate its type correctly - the symbol has assigned ErrorType(attribute) for some reason unknown to me yet.
May be related to the latest reincarnation of JFXC-1309.
Yes, with JFXC-1309 fixed, this exception no longer occurs and go-to works well. I'm keeping this issue open (degraded) as the code in ElementOpen should still handle broken symbols gracefully.
The exception is reproduced if the file is not compiled: ---------- Main.fx ------------------ a Echo{ message: "Hello World!"} --------------------------------------- java.lang.NullPointerException at org.netbeans.api.javafx.editor.ElementOpen.getFile(ElementOpen.java:221) at org.netbeans.api.javafx.editor.ElementOpen.open(ElementOpen.java:128) at org.netbeans.modules.javafx.editor.GoToSupport$1.run(GoToSupport.java:172) at org.netbeans.modules.javafx.editor.GoToSupport$1.run(GoToSupport.java:121) at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:354) I think that it is better to show a message "Unable the found the source because the file is not compiled" in this case instead of the NPE.
Created attachment 63987 [details] IDE log file (ElementOpen.getFile)
This is now fixed thanks to refixing JFXC-1309 and more robust ElementHandle implementation: http://hg.netbeans.org/javafx/rev/30870bed7131
had to substitue var for attribute. Tested using FX Cont trunk build 130 (Sep 9, 2008 4:49:22 PM) on NB6.5: Product Version: NetBeans IDE Dev (Build 200809081401) Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b14 System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)