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 230356

Summary: [Options] Apply button stays enabled OR even resets the keymap options
Product: editor Reporter: markiewb
Component: Key bindingsAssignee: Svata Dedic <sdedic>
Status: RESOLVED FIXED    
Severity: normal CC: jlahoda, MackSix, padraigdoran, theofanis
Priority: P2    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description markiewb 2013-05-28 07:33:08 UTC
[ BUILD # : 201305262300 ]
[ JDK VERSION : 1.7.0_21 ]

There are hard to track bugs in the options dialog regarding the new apply
button [1]. I also spotted that the Apply button resets settings to default.

Here some tries to reproduce (note they won't 100% every time, but that is the
best I could do to describe/reproduce the faulty behavior):

Situation A: 
* Open options|Keymap -> NetBeans is selected as keymap
* Switch to eclipse keymap 
ACTUAL: Apply button is disabled, OK button is enabled
EXPECTED: Apply button is enabled, OK button is enabled (IMHO)
* Press OK -> keymap selection is saved
* Open Options|Editor|Hint
* disable/enable several hints 
-> Apply button is enabled, OK button is enabled OR
-> sometimes the checkboxes of hints cannot be un/checked (but are enabled
[sic!])
* Press the Apply button -> Apply button flashes and gets enabled again
* Press the Apply button -> Apply button flashes and gets enabled again
* repeat ...

Situation B:
(Prerequisite: keymap is set to eclipse) 
* Make some changes in the options dialog, so that the Apply button gets
enabled
* switch to the keymap options
* Press the Apply button -> Apply button flashes and gets enabled again
* Press the Apply button -> selected keymap options gets reset to NetBeans 

It is very very annoying when working with a non-default keymap and this keymap
selection gets lost when you do something completely different in the options.
It is unusable this way.


Situation C:
* sometimes when you open the options the apply button is already enabled, but
you haven't changed anything yet


[1] https://netbeans.org/bugzilla/show_bug.cgi?id=204921
Comment 1 markiewb 2013-06-03 20:47:39 UTC
This issue is still valid with the build 201306022301
Comment 2 Svata Dedic 2013-06-06 08:01:53 UTC
Should be fixed by http://hg.netbeans.org/jet-main/rev/7bb976b0f7a1

cc:ing Lahvac for some fixes are in Java hints.
Comment 3 Quality Engineering 2013-06-10 02:20:42 UTC
Integrated into 'main-golden', will be available in build *201306100004* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7bb976b0f7a1
User: Svata Dedic <sdedic@netbeans.org>
Log: #230356: do not change isChanged in settings load. Report only actual changes through isChanged, fire change events (CSL). isChanged ought to be called in EDT
Comment 4 markiewb 2013-07-01 22:22:39 UTC
Reopen. It happens again. 201307011244

I have no specific reproduction order, but it happens for real. Has anyone using a non-NetBeans keymap seen this issue too? I am always wondering (and get confused) when my shortcuts stop working. In this case I have to double check the selected keymap and in 2 of 3 cases the selected keymap has been changed without my interaction (in the keymap panel).
Comment 5 MackSix 2013-07-04 18:29:33 UTC
1. Open Tools>>Options>>Keymap and choose Eclipse profile.
2. Changes are seen in the table without clicking Apply Button.
3. Click Apply Button and it stays activated.
4. Click Apply Button again and Keymap automatically switches back to NetBeans profile for no reason.

Expected: Apply button is deactivated once clicked and one has to manually choose NetBeans profile and click Activate Button again for change of profile occurs.

Repeatable


Product Version: NetBeans IDE Dev (Build 201307032300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 6 MackSix 2013-07-04 18:41:18 UTC
Another problem:

1. Open Tools>>Options>>Keymap and choose Eclipse profile.
2. Changes are seen in the table without clicking Apply Button.
3. Click Apply Button and it stays activated.
4. Close Option dialog box and reopen it.
5. Keymap profile is set back to NetBeans profile.

Expected: Eclipse profile is retained.

Repeatable


Product Version: NetBeans IDE Dev (Build 201307032300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 7 MackSix 2013-07-04 18:44:49 UTC
Another problem #2:

1. Open Tools>>Options>>Keymap and choose Eclipse profile.
2. Changes are seen in the table without clicking Apply Button.
3. Click OK Button. Options dialog closes.
4. Reopen Options dialog. Keymap profile is still Eclipse as expected. 
5. Make changes for other menu item (Java, PHP, etc.) so that Apply button is activated.
6. Click Apply button.
7. Look at Keymap and the profile was switched back to NetBeans.

Expected: Eclipse profile is retained after making changes in other areas of Options.

Repeatable


Product Version: NetBeans IDE Dev (Build 201307032300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 8 MackSix 2013-07-04 19:02:45 UTC
Another Problem #3:

Sometimes the Apply Button can bee seen to activate and deactivate automatically, for no reason, when viewing a tab like PHP>>Code Analysis. This resets the Keymap profile back to NetBeans.
Comment 9 Svata Dedic 2013-07-08 08:47:06 UTC
Please - file a separate issue for each problem you find. Although more work, it allows to better track / discuss / request further information for each of the issues.

Re.: comments #5, #6 and #7 - a duplicate of issue #232282. They should be all now fixed.

Re.: comment 8: this is unrelated to Keymaps. Filed separately as issue #232367

Focusing on issue from comment #4
Comment 10 Svata Dedic 2013-07-08 08:52:49 UTC
If the comment #4 means that the keymap is sometime reset (original situation B), then the issue is supposedly fixed by #232282 according to the symptoms. 

I cannot reproduce erratic behaviour of Apply button on the keymap pane. Note though that each of the panes reports is 'changed' status and all together contribute to the Apply button enabled state. If you observe Apply button misbehaviour on a particular Tools | Options pane, please file an issue against product/component that you suppose is responsible  for that pane.