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.
Summary: | When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. | ||
---|---|---|---|
Product: | cnd | Reporter: | soldatov <soldatov> |
Component: | Code Model | Assignee: | Thomas Preisler <thp> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | sustaining |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
soldatov
2008-04-17 16:01:06 UTC
I checked the code and it looks like a notification is going to the codemodel: NativeProjectListenerImpl.filesPropertiesChanged() is called. It means the bug is most likely somewhere in the code model. Yes, the notification is ok. The issue is that macros values that are changed in options dialog, aren't used until IDE restart. I.e. the system macros list that is returned my NativeFileItem does not contain the newly created macro. For somewhat reason, there are two instances of the SunCCompiler - one is used when storing settings from option dialog, and another one is used in NativeFileItem.gSystemMacroDefinitions (though I have the only SunStudio_12 compiler collection) I noticed that when working with option dialog, a new instance of SunCCompiler is created (via SunCCompiler.createCopy()). But Items use the old one; and the from the copy (that is changed in dialog) doesn't get into the original one I see what is going on. The BuildTool panel and the Code Assistance panel are owned by core and project system respectively. The The Build Tool panel creates a copy of current compiler set and assigns the copy to the default if something has changes. But the Build Tool panle doesn't see if something has changed in the Code Assistance and doesn't assign the copy to the current compiler set. If you make a change in *both* the build tool panel and the code assistance panel it works as expected. The real fix is to move the code assistance panles in under the same owner as the build tool panel so it can track changes more easily. For now I may be able to notify the build tool panel that something has changed and it will do the right thing. Fixed: changeset: 79126:323a6b531051 user: Thomas Preisler <thp@netbeans.org> date: Thu Apr 24 13:35:06 2008 -0700 summary: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. changeset: 79127:84fc6fd46009 tag: tip user: Thomas Preisler <thp@netbeans.org> date: Thu Apr 24 13:35:34 2008 -0700 summary: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. The particular problem stated in this IZ should be fixed. But I see in the code that there are other similar problems: using the Restore button suffer from similar problem. A notofication goes out but the compiler sets may not be saved so the code model uses old and unchanged sets. I prefer to close this IZ as fixed (so we can get it into the patch) and file a new issue with the remaining problem. changeset 84fc6fd46009 in main details: http://hg.netbeans.org/main?cmd=changeset;node=84fc6fd46009 description: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. changeset 323a6b531051 in main details: http://hg.netbeans.org/main?cmd=changeset;node=323a6b531051 description: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. One more change set fixing problem with 'Restore Default': changeset 3920e5add6bc in main details: http://hg.netbeans.org/main?cmd=changeset;node=3920e5add6bc description: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. If you Restore Defaults and also Cancel the dialog things are still not quite right, but much better than before. Would like this to go into Patch 1. Please open new IZ for remaining issue. Original problem fixed. verified in 20080425101413 build If I press 'Reset Settings' button in 'Code Assistance' tab, then IDE works wrongly. Tomorrow I create new bug. It is when you press Restore Defaults and also Cancel (instead of OK) the dialog things are not correct. If you Restore Defaults and also OK things should work fine. I described my problem in issue 134029 I've transplanted the changesets from main into release61_fixes repository main release61_fixes ------------ --------------- 84fc6fd46009 9e5e405ef537 323a6b531051 95931aa7053b 3920e5add6bc 89b56272e7ff http://hg.netbeans.org/release61_fixes/rev/9e5e405ef537 http://hg.netbeans.org/release61_fixes/rev/95931aa7053b http://hg.netbeans.org/release61_fixes/rev/89b56272e7ff changeset: 77494:9e5e405ef537 user: Thomas Preisler <thp@netbeans.org> date: Thu Apr 24 13:35:34 2008 -0700 summary: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. changeset: 77495:95931aa7053b user: Thomas Preisler <thp@netbeans.org> date: Thu Apr 24 13:35:06 2008 -0700 summary: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. changeset: 77496:89b56272e7ff tag: tip user: Thomas Preisler <thp@netbeans.org> date: Thu Apr 24 21:13:26 2008 -0700 summary: 133127 When user changes compiler settings in 'Code Assistance' tab, then projects ignores these changes. |