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.

Bug 145096

Summary: Macros in Editor->Macros and Keymap are not synchronized
Product: editor Reporter: Jiri Prox <jiriprox>
Component: OptionsAssignee: issues@editor <issues>
Status: RESOLVED WONTFIX    
Severity: blocker Keywords: API
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jiri Prox 2008-08-26 08:39:43 UTC
Product Version: NetBeans IDE Dev (Build 20080826025225)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

The macros in Editor -> Macros and Keymap, category 'Editor Macros' are not synchronized, until the options dialog is
reopened. This allows for example assigning shortcut to already deleted macro, which results in following exception:

java.lang.NullPointerException: keyStrokes cannot be null
	at org.netbeans.api.editor.settings.MultiKeyBinding.<init>(MultiKeyBinding.java:75)
	at org.netbeans.modules.editor.macros.storage.ui.MacrosModel$Macro.setShortcuts(MacrosModel.java:301)
	at org.netbeans.modules.editor.macros.MacrosKeymapManager.saveKeymap(MacrosKeymapManager.java:123)
	at org.netbeans.modules.options.keymap.KeymapModel.changeKeymap(KeymapModel.java:276)
	at org.netbeans.modules.options.keymap.KeymapViewModel$4.run(KeymapViewModel.java:425)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 Petr Dvorak 2008-08-26 10:53:01 UTC
Maybe a duplicate of issue 132756?
Comment 2 Jiri Prox 2008-08-26 11:17:55 UTC
I'd say no, the issue is about synchronization, the exception is one of the results
Comment 3 Vitezslav Stejskal 2008-08-26 13:02:33 UTC
Well, the problem is that KeymapManager does not allow to fire changes. In the case of Macros there are two UI panels
working with the same model, but the model is not capable of notifying them about its changes. This may not be that
critical when shortcuts are hidden from the Keymap panel as suggested in issue #145050.
Comment 4 David Strupl 2009-03-31 15:50:48 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 5 Quality Engineering 2009-11-02 11:02:45 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX