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.
We have been using the NetBeans Lookup API to lookup the NetBeans implementation of Keymap and setting that object's resolve parent to our own Keymap. Everything has been working fine until we upgraded to NetBeans 6.8 (platform11). When we run our application, we now get this exception during the call to setResolveParent(): java.lang.UnsupportedOperationException at org.netbeans.core.NbKeymap.setResolveParent(NbKeymap.java:415) at com.candelis.platform.core.keymap.KeymapController$1.run(KeymapController.java:41) [catch] at org.netbeans.core.windows.WindowManagerImpl$Exclusive$1.run(WindowManagerImpl.java:1317) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) 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) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Please let me know if you need more information. Thanks, Pouyan
True, there were no known callers of this method, nor anything documenting that NbKeymap could be used in this way, so the resolve parent feature of Keymap was not implemented. I would suggest you structure your application differently. For example, write your Keymap to first check NbKeymap for a binding, and if not found, do something else before returning null.
No plans to fix this, nor test case to check against. Tested patches are welcome.
My question is why was this functionality taken out of NbKeymap when it is clearly working in Netbeans 6.7.1 and earlier? The fact that the implementation of setResolveParent() was there means that it has the potential to be used, which in my case it is. This little issue is preventing me from attempting to upgrade my Netbeans IDE to later versions
(In reply to comment #3) > why was this functionality taken out of NbKeymap NbKeymap was completely rewritten for performance reasons. No code in the NB platform calls setResolveParent on it, and there was no known use case for doing so from a custom app (I still have no idea why you are). It was implemented before just for the sake of implementing method bodies, so I did not bother reimplementing it in the new version.