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.
Build: NetBeans IDE 8.0.2 (Build 201411181905) VM: Java HotSpot(TM) 64-Bit Server VM, 25.40-b25, Java(TM) SE Runtime Environment, 1.8.0_40-b26 OS: Windows 7 User Comments: err: I had a declarative hint called "astroitem genericize" (the name in the list) I renamed it to "astroitem-genericize" (note the "-") Then I couldn't access it from the inspect/tranform dialog anymore to edit it So I renamed it back, shortly therafter got this exception. The rename did not work. A Stacktrace: java.lang.IllegalArgumentException: Called DataObject.find on null at org.openide.loaders.DataObject.find(DataObject.java:555) at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.getDataObject(HintsPanel.java:1349) at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.editScriptButtonActionPerformed(HintsPanel.java:791) at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.access$1100(HintsPanel.java:139) at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel$11.actionPerformed(HintsPanel.java:625) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
Created attachment 153936 [details] stacktrace
I closed the IDE, manually renamed the file in /config/rules/, restarted IDE, then it was OK.
The root cause is that the UI is trying to infer the DataObject from HintMetadata, using the id. However the id may be derived by parsing <!hint> directive. In your specific case, the algorithm the UI uses to get the DataObject (so it can rename it) clashes with some disambiguation done by declarative hints infrastructure. Perhaps the parsing should be redesigned as one file may produce several Hints which appear separately in the tree for management. Not good. In the meantime, please do NOT use "-" in hint names.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss