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.
Summary: | on right-click actions are created before cursor is moved in text component | ||
---|---|---|---|
Product: | editor | Reporter: | Vladimir Voskresensky <vv159170> |
Component: | Actions/Menu/Toolbar | Assignee: | issues@editor <issues> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | issues |
Priority: | P2 | Keywords: | SIMPLEFIX |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Suggested fix |
Description
Vladimir Voskresensky
2008-07-15 16:08:23 UTC
Created attachment 64674 [details]
Suggested fix
The problem is, that BaseCaret listener is registered after EditorUI, so the menu is created before caret update. I have a trivial fix, but I have no idea if the fix is safe. Needs to be reviewed. I think this fix will result in NPE from BaseCaret.install, which expects EditorUI to have already been installed to the component. The initialization of editor panes is pretty clumsy and we should clean it up one day. As a quick fix for this I think we could re-post the popup menu's creation in EditorUI.showPopupMenuForPopupTrigger to the AWT thread. This way all the other mouse listeners will have a chance to perform their tasks before the menu is shown. Thanks for the patch anyway. Thank you very much! Works great now If you can verify that your issue was resolved, set it's state to verified please. Thanks in advance. sure, verified Integrated into 'main-golden', available in NB_Trunk_Production #324 build Changeset: http://hg.netbeans.org/main/rev/1c9438ecee00 User: Vita Stejskal <vstejskal@netbeans.org> Log: #140127 (fixed): postponing popup menu creation |