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.
Can not open JavaScript file.
Created attachment 36195 [details] exception
I do not think this is an editor bug: JEditorPane.setEditorKit is called outside the AWT Event Dispatch Thread, which is not allowed. I do not think it is allowed to call CloneableEditorSupport.getOpenedPanes outside the AWT, either.
There should be some notice in JavaDoc for CloneableEditorSupport.getOpenedPanes, in this case, and some AssertException too.
J have updated the documentation but haven't enabled the assertion yet, as ToggleBreakpoint action, excercised during commit validation calls the method from RequestProcessor, which is wrong. Reassigning to debugger to fix their usage. Once fixed, please reassing back so I can enable the assertion w/o disturbing commit validation.
Hmm, original Javadoc of getOpenedPanes() does not say anything about threading, so I guess that this is an incompatible API change, right? It will take some time to go through all usages, it's definitely not only ToggleBreakpointActionProvider.
It didn't, yet it had to call into swing in some cases and it proved to be unsafe. In case I don't assert directly in the method, you may get much more random and harder to spot assertion failure from deeper stack, like in this case.
I understand. But I still think, that the API should mention that this must be called in AWT.
It does so now.
O.K. So it's assured now that debugger calls it in AWT only. So the assertions can be enabled now, moving back to openide/editor. /cvs/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/EditorContextImpl.java,v <-- EditorContextImpl.java new revision: 1.3; previous revision: 1.2 /cvs/debuggerjpda/projects/src/org/netbeans/modules/debugger/jpda/projects/ToolTipAnnotation.java,v <-- ToolTipAnnotation.java new revision: 1.2; previous revision: 1.1
assert enabled: openide/text/src/org/openide/text/CloneableEditorSupport.java,v1.27
verified - assertion works and some other issues have been already reported against appropriate modules. I would ask for better message , the current one "AWT" is really not much descriptive - issue 92379.