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.
I added support for an own schema based xml file type. I'm able to open an xml editor for my file type but as soon as I try to modify the file the following NPE is thrown: java.lang.NullPointerException at org.netbeans.modules.xml.text.syntax.XMLSyntaxSupport.noCompletion(XMLSyntaxSupport.java:681) at org.netbeans.modules.xml.text.syntax.XMLSyntaxSupport.checkCompletion(XMLSyntaxSupport.java:653) at org.netbeans.modules.xml.text.completion.XMLCompletionProvider.getAutoQueryTypes(XMLCompletionProvider.java:81) at org.netbeans.modules.editor.completion.CompletionImpl.insertUpdate(CompletionImpl.java:301) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:70) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1612) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:770) at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:201) at org.netbeans.modules.editor.indent.FormatterImpl.indentLine(FormatterImpl.java:164) at org.netbeans.modules.editor.indent.FormatterImpl.indentNewLine(FormatterImpl.java:159) at org.netbeans.editor.BaseKit$InsertBreakAction$1.run(BaseKit.java:1192) at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:324) at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1183) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:291) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636) at javax.swing.JComponent.processKeyBinding(JComponent.java:2849) at javax.swing.JComponent.processKeyBindings(JComponent.java:2884) at javax.swing.JComponent.processKeyEvent(JComponent.java:2812) at java.awt.Component.processEvent(Component.java:5911) at java.awt.Container.processEvent(Container.java:2023) at java.awt.Component.dispatchEventImpl(Component.java:4501) at java.awt.Container.dispatchEventImpl(Container.java:2081) at java.awt.Component.dispatchEvent(Component.java:4331) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668) at java.awt.Component.dispatchEventImpl(Component.java:4373) at java.awt.Container.dispatchEventImpl(Container.java:2081) at java.awt.Window.dispatchEventImpl(Window.java:2458) at java.awt.Component.dispatchEvent(Component.java:4331) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Created attachment 68112 [details] Module suite project showing the issue
In order to reproduce the problem please proceed as follows: 1) Run the application 2) Select Window->Favorites 3) Navigate to suite11/NameList/src/org/yourorghere/namelist 4) Doubleclick namelist.xml (which will open the xml editor) 5) Try to modify the document by entering some text (this will throw the NPE)
Fixed: http://hg.netbeans.org/main?cmd=changeset;node=fafa12337c69.
Integrated into 'main-golden', available in build *200808230201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/fafa12337c69 User: samaresh@netbeans.org Log: #144854 XML editor throws NPE