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.
Reproduced in build070201. - unzip and open attached project TestXslt2.zip; - switch to source; - find and edit any "value-of" rule. NPE occurs.
Created attachment 37916 [details] TestXslt2 project archive
java.lang.NullPointerException at org.netbeans.modules.xsl.grammar.XSLGrammarQuery.queryValues(XSLGrammarQuery.java:645) at org.netbeans.modules.xml.text.completion.XMLCompletionQuery.queryValues(XMLCompletionQuery.java:313) at org.netbeans.modules.xml.text.completion.XMLCompletionQuery.query(XMLCompletionQuery.java:116) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider.queryImpl(XMLCompletionProvider.java:105) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider.access$100(XMLCompletionProvider.java:51) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider$Query.doQuery(XMLCompletionProvider.java:87) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider$AbstractQuery.query(XMLCompletionProvider.java:123) at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Philipp, please use more appropriate subcomponents.
Current XSL editor autocompletion feature requires DataObject to support ScenarioCookie. We can not implement such cookie for our dataobject without introducing implementation dependency with XML core module. This bug should be fixed on XSL editor side, because such behavior makes this editor non-reusable as a part of other multiview editors(for example, our Transformation editor)
Index: XSLGrammarQuery.java =================================================================== RCS file: /cvs/xml/xsl/src/org/netbeans/modules/xsl/grammar/XSLGrammarQuery.java,v 644,645c644,646 < Object selScenarioObj = scenarioCookie.getModel().getSelectedItem(); --- > // Object selScenarioObj = scenarioCookie.getModel().getSelectedItem();
fixed in 070216_3.
I didn't ind any value-of rules in the source. I added my own and didn't get NPE fix VERIFIED rc1 build 200703261315.