Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 179391 - NbKeymap's setResolveParent() method throws UnsupportedOperationException in Netbeans 6.8
NbKeymap's setResolveParent() method throws UnsupportedOperationException in ...
Product: platform
Classification: Unclassified
Component: Module System
PC Windows XP
: P4 with 1 vote (vote)
Assigned To: Jesse Glick
Depends on:
Blocks: 152576
  Show dependency treegraph
Reported: 2010-01-11 10:32 UTC by pouyan
Modified: 2010-10-27 17:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description pouyan 2010-01-11 10:32:33 UTC
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():

	at org.netbeans.core.NbKeymap.setResolveParent(
	at com.candelis.platform.core.keymap.KeymapController$
[catch] at$Exclusive$
	at java.awt.event.InvocationEvent.dispatch(
	at java.awt.EventQueue.dispatchEvent(
	at org.netbeans.core.TimableEventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(

Please let me know if you need more information.


Comment 1 Jesse Glick 2010-01-11 14:29:02 UTC
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.
Comment 2 Jesse Glick 2010-10-15 20:48:32 UTC
No plans to fix this, nor test case to check against. Tested patches are welcome.
Comment 3 pouyan 2010-10-27 17:05:18 UTC
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
Comment 4 Jesse Glick 2010-10-27 17:18:22 UTC
(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.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo