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 239948 - Inconsistent activation/deactivation of Apply button from Miscellaneous->CssPreprocessors options panel
Summary: Inconsistent activation/deactivation of Apply button from Miscellaneous->CssP...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks: 239792
  Show dependency tree
 
Reported: 2014-01-03 10:31 UTC by Theofanis Oikonomou
Modified: 2014-01-09 09:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (4.51 KB, patch)
2014-01-08 18:09 UTC, Theofanis Oikonomou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Theofanis Oikonomou 2014-01-03 10:31:24 UTC

    
Comment 1 Theofanis Oikonomou 2014-01-03 17:12:32 UTC
Tomasi I tried to dig into css.prep and web.common code. CssPrepOptionsPanelController get's notified when I eg click on a ckeckbox in less/saas sub-panels but I am not sure how to notify CssPrepOptionsPanelController that a change should activate the Apply button or not. Any comment would be very helpful. Thank you
Comment 2 Tomas Mysik 2014-01-06 07:19:11 UTC
(In reply to Theofanis Oikonomou from comment #1)
> I am not sure how to notify
> CssPrepOptionsPanelController that a change should activate the Apply button
> or not

Sorry, I am not sure what you mean by that... Could you be more specific, please? In any case, feel free to change/improve/fix the existing code as you wish.

Thanks.
Comment 3 Theofanis Oikonomou 2014-01-08 18:09:34 UTC
Created attachment 143726 [details]
patch

Attaching patch that solves the issue. 

I added a new method, boolean changed(), in CssPreprocessorImplementation.Options interface in web.common module which is AFAICT only implemented by LessOptions and SaasOptions in css.prep module. 

All the other friend modules stay unaffected. Actually I could only not locate ruby.railsprojects and web.flyingsaucer in core-main, so any hints where they are so that I can test and be 100% sure that they do not implement CssPreprocessorImplementation.Options would be much appreciated. 

If you agree I will push the change. Thank you
Comment 4 Tomas Mysik 2014-01-09 07:30:08 UTC
In fact I am not sure why the current state does not work but I don't understand Options and its validation at all ;)

(In reply to Theofanis Oikonomou from comment #3)
> Attaching patch that solves the issue.

The patch seems fine to me.

> All the other friend modules stay unaffected. Actually I could only not
> locate ruby.railsprojects and web.flyingsaucer in core-main, so any hints
> where they are so that I can test and be 100% sure that they do not
> implement CssPreprocessorImplementation.Options would be much appreciated. 

CssPreprocessorImplementation is a quite new class and it would make no sense for those modules to implement it (none of them is CSS preprocessor).

> If you agree I will push the change. Thank you

Please do so. Thanks a lot!
Comment 5 Theofanis Oikonomou 2014-01-09 09:14:17 UTC
(In reply to Tomas Mysik from comment #4)
> In fact I am not sure why the current state does not work but I don't
> understand Options and its validation at all ;)

when the user changes something in the css preposeccors panel then you fire an event notifying that the panel is modified and the Apply button gets activated. When the users changes that option back to its initial value then you still return that the panel is modified, which is true in the sense that the user changed stuff in the panel but in reality no changes need to be persisted, and so the Apply button stays enabled which is wrong IMHO. This was not needed at all when the Apply button was not present. I hope it is more clear now :)

> 
> (In reply to Theofanis Oikonomou from comment #3)
> > Attaching patch that solves the issue.
> 
> The patch seems fine to me.
> 
> > All the other friend modules stay unaffected. Actually I could only not
> > locate ruby.railsprojects and web.flyingsaucer in core-main, so any hints
> > where they are so that I can test and be 100% sure that they do not
> > implement CssPreprocessorImplementation.Options would be much appreciated. 
> 
> CssPreprocessorImplementation is a quite new class and it would make no
> sense for those modules to implement it (none of them is CSS preprocessor).

ok just wanted to be 100% sure that the change in the interface will not brake any client.

> 
> > If you agree I will push the change. Thank you
> 
> Please do so. Thanks a lot!
Comment 6 Theofanis Oikonomou 2014-01-09 09:21:16 UTC
Changeset: 7f7d9232a7b1
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2014-01-09 10:22
Message:
Comment 7 Tomas Mysik 2014-01-09 09:51:11 UTC
I see now. Thanks for your explanation and the fix!