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 created a Desktop Application and then attempted to add a new action to a button using the GUI editor. When I hit OK, the annotated method (@Action) does not appear in the code nor in the *view.properties file. I noticed that I am getting the following exception in the NetBeans log file. I have updated NetBeans 6.8 fully and added a number of other plug-ins (like findbugs) so its possible that one of those may have broken the Desktop capability. org.netbeans.editor.GuardedException: Attempt to insert into guarded block at position 10,119. at org.netbeans.editor.GuardedDocument.preInsertCheck(GuardedDocument.java:237) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:735) at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:369) at org.netbeans.api.java.source.ModificationResult.access$100(ModificationResult.java:85) at org.netbeans.api.java.source.ModificationResult$3.run(ModificationResult.java:344) at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:357) at org.openide.text.NbDocument.runAtomicAsUser(NbDocument.java:437) at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:354) Caused: java.io.IOException at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:360) at org.netbeans.api.java.source.ModificationResult.commit2(ModificationResult.java:329) at org.netbeans.api.java.source.ModificationResult.access$000(ModificationResult.java:85) at org.netbeans.api.java.source.ModificationResult$2.run(ModificationResult.java:234) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:327) at org.openide.text.NbDocument.runAtomic(NbDocument.java:411) at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:231) at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:194) at org.netbeans.modules.swingapp.ActionManager.createActionMethod(ActionManager.java:493) at org.netbeans.modules.swingapp.ActionEditor.createNewAction(ActionEditor.java:559) at org.netbeans.modules.swingapp.ActionEditor.confirmChanges(ActionEditor.java:445) at org.netbeans.modules.swingapp.ActionEditor.vetoableChange(ActionEditor.java:415) at org.netbeans.modules.form.FormCustomEditor.commitChanges(FormCustomEditor.java:329) at org.netbeans.modules.form.actions.PropertyAction$1.actionPerformed(PropertyAction.java:108) at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1274) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1046) at java.awt.Dialog$3.run(Dialog.java:1098) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1096) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:985) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1019) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1007) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:115) at org.openide.util.Mutex.doEventAccess(Mutex.java:1355) at org.openide.util.Mutex.readAccess(Mutex.java:268) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:992) at java.awt.Component.show(Component.java:1563) at java.awt.Component.setVisible(Component.java:1515) at java.awt.Window.setVisible(Window.java:842) at java.awt.Dialog.setVisible(Dialog.java:986) at org.netbeans.modules.form.actions.PropertyAction.actionPerformed(PropertyAction.java:129) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) 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) [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) INFO [org.netbeans.modules.swingapp.ActionManager$ActionMethodTask] java.lang.NullPointerException at org.netbeans.modules.swingapp.ActionManager.jumpToActionSource(ActionManager.java:346) at org.netbeans.modules.swingapp.ActionEditor.confirmChanges(ActionEditor.java:449) at org.netbeans.modules.swingapp.ActionEditor.vetoableChange(ActionEditor.java:415) at org.netbeans.modules.form.FormCustomEditor.commitChanges(FormCustomEditor.java:329) at org.netbeans.modules.form.actions.PropertyAction$1.actionPerformed(PropertyAction.java:108) at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1274) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178) at java.awt.Dialog$1.run(Dialog.java:1046) at java.awt.Dialog$3.run(Dialog.java:1098) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1096) at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:985) at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1019) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1007) at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:115) at org.openide.util.Mutex.doEventAccess(Mutex.java:1355) at org.openide.util.Mutex.readAccess(Mutex.java:268) at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:992) at java.awt.Component.show(Component.java:1563) at java.awt.Component.setVisible(Component.java:1515) at java.awt.Window.setVisible(Window.java:842) at java.awt.Dialog.setVisible(Dialog.java:986) at org.netbeans.modules.form.actions.PropertyAction.actionPerformed(PropertyAction.java:129) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1223) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1264) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) 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) [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
There is a chance that this bug was caused by either PMD or the CheckStyle plugins. I disabled those two in NetBeans and the problem seems to have gone away. (FindBugs is still enabled though.) I'll let you know if I find out more details.
not a P1 ... I am not able to reproduce it in NB 6.9 (clear install without additional plugins)
I am sorry, I am not able to reproduce this issue and the attached exception is not sufficient to track the problem down => closing as non-reproducible. Feel free to reopen this issue if you are able to provide exact steps to reproduce. Thank you in advance.
I am fairly certain the problem was caused by an interaction of either the PMD or CheckStyle modules and the editor. I left FindBugs enabled and I was able to use the Java Desktop project and editor without any issues. When I get a chance, I'll report an issue to the https://sqe.dev.java.net/ project.