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 232367

Summary: Apply Button in Tools | Options activated for no reason
Product: php Reporter: Svata Dedic <sdedic>
Component: CodeAssignee: Tomas Mysik <tmysik>
Status: RESOLVED FIXED    
Severity: normal CC: MackSix
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
See Also: https://netbeans.org/bugzilla/show_bug.cgi?id=232279
https://netbeans.org/bugzilla/show_bug.cgi?id=232337
https://netbeans.org/bugzilla/show_bug.cgi?id=232448
https://netbeans.org/bugzilla/show_bug.cgi?id=232456
https://netbeans.org/bugzilla/show_bug.cgi?id=232458
Issue Type: DEFECT Exception Reporter:

Description Svata Dedic 2013-07-08 08:45:06 UTC
This was originally filed as part of issue #230356, but is (IMHO) not related to Keymaps, but rather to PHP, or core Options infrastructure.

The original report says:

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.

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 1 Tomas Mysik 2013-07-08 08:50:10 UTC
The reason here is that NetBeans is detecting available Code Sniffer standards.

@MackSix: Could you please provide exact steps to reproduce and what exact problem does it cause?

Thanks.
Comment 2 MackSix 2013-07-09 15:39:40 UTC
(In reply to comment #1)
> The reason here is that NetBeans is detecting available Code Sniffer standards.
> 
> @MackSix: Could you please provide exact steps to reproduce and what exact
> problem does it cause?
> 
> Thanks.

With the latest Dev version, I can now just go to PHP>>Code Analysis and setup Code Sniffer and Mess Detector and anytime I view that tab, the Apply button is activating automatically for no reason. If I press it, CND Validating Tools Collection runs in status too. The Apply Button stays activated.

I also added URLs other related problems. I have yet put my finger on exact steps, but this can throw exception and cause the modules to automatically deactivate when restarting NetBeans. It is just a combination of setting a Keymap and hitting OK and then viewing the Code Analysis tab and hitting OK and then viewing again and then changing something and hitting Apply. It happens several times, but I have no exact steps to reproduce as of yet.

Product Version: NetBeans IDE Dev (Build 201307082300)
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 3 MackSix 2013-07-10 12:37:36 UTC
*** Bug 232511 has been marked as a duplicate of this bug. ***
Comment 4 MackSix 2013-07-10 12:42:51 UTC
Still valid in NetBeans IDE 7.4 Beta (Build 201307092200)
Comment 5 Tomas Mysik 2013-07-11 07:23:11 UTC
Behaviour improved a lot. However, please notice that:

(a) Once you open PHP > Code Analysis for the _first_ time, the Apply button will be active because PHP Code Sniffer standards are fetched in a background and once they are fetched, they are put to the UI and proper item is selected -> this means change event even if the standard is the saved one;
(b) after this fix, if one clicks Apply, no Code Sniffer standards are fetched again anymore (as they used to be) but the Apply button is still active and this seems to me to be a bug in the Options infrastructure - please, submit it as a new bug.

Thanks.

http://hg.netbeans.org/web-main/rev/1c1d6499860d
Comment 6 Quality Engineering 2013-07-12 02:35:58 UTC
Integrated into 'main-silver', will be available in build *201307112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1c1d6499860d
User: Tomas Mysik <tmysik@netbeans.org>
Log: #232367 - Apply Button in Tools | Options activated for no reason
Comment 7 MackSix 2013-07-13 12:07:28 UTC
(In reply to comment #5)
<snip>
> (b) after this fix, if one clicks Apply, no Code Sniffer standards are fetched
> again anymore (as they used to be) but the Apply button is still active and
> this seems to me to be a bug in the Options infrastructure - please, submit it
> as a new bug.
<snip>

This is the report to platform about the Apply button staying enabled after clicking it: Issue 232279