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.
If C/C++ and Groovy both activated, the groovy editor for standalone script does not work (cannot add new line) Exception in log: SEVERE [global] java.lang.NullPointerException: The file object parameter cannot be null at org.openide.util.Parameters.notNull(Parameters.java:89) at org.netbeans.modules.cnd.utils.MIMESupport.getSourceFileMIMEType(MIMESupport.java:76) at org.netbeans.modules.cnd.editor.options.CodeStylePreferencesProvider$1.forFile(CodeStylePreferencesProvider.java:76) at org.netbeans.modules.cnd.editor.options.CodeStylePreferencesProvider.forFile(CodeStylePreferencesProvider.java:64) at org.netbeans.modules.editor.indent.spi.CodeStylePreferences.getPreferences(CodeStylePreferences.java:170) at org.netbeans.modules.groovy.editor.language.GroovyFormatter.hangingIndentSize(GroovyFormatter.java:101) at org.netbeans.modules.groovy.editor.language.GroovyFormatter.computeIndents(GroovyFormatter.java:461) at org.netbeans.modules.groovy.editor.language.GroovyFormatter.reindent(GroovyFormatter.java:374) at org.netbeans.modules.groovy.editor.language.GroovyFormatter.reindent(GroovyFormatter.java:86) at org.netbeans.modules.csl.core.GsfIndentTask.reindent(GsfIndentTask.java:72) at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:573) at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:334) at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:299) at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:171) at org.netbeans.modules.editor.indent.api.Indent.reindent(Indent.java:155) at org.netbeans.editor.BaseKit$InsertBreakAction.performLineBreakInsertion(BaseKit.java:1625) at org.netbeans.editor.BaseKit$InsertBreakAction.access$400(BaseKit.java:1440) at org.netbeans.editor.BaseKit$InsertBreakAction$2.run(BaseKit.java:1530) at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:356) at org.netbeans.editor.BaseKit$InsertBreakAction.actionPerformed(BaseKit.java:1521) at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663) at javax.swing.JComponent.processKeyBinding(JComponent.java:2882) at javax.swing.JComponent.processKeyBindings(JComponent.java:2929) at javax.swing.JComponent.processKeyEvent(JComponent.java:2845) at java.awt.Component.processEvent(Component.java:6310) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771) at java.awt.Component.dispatchEventImpl(Component.java:4760) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Created attachment 164417 [details] proposed patch
fixed in change set: http://hg.netbeans.org/cnd-main/rev/03cc0184d3d7
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/03cc0184d3d7 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #270748 C/C++ editor destroys groovy editor