Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 235955 - "No c/c++ compiler found" message after closing options dialog
"No c/c++ compiler found" message after closing options dialog
Status: RESOLVED WONTFIX
Product: cnd
Classification: Unclassified
Component: Toolchain
7.4
PC Windows 7
: P3 (vote)
: 8.1
Assigned To: Vladimir Voskresensky
issues@cnd
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-13 19:54 UTC by markiewb
Modified: 2016-06-14 12:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
shows the dialog which popped up (67.67 KB, image/png)
2013-09-13 19:54 UTC, markiewb
Details
Demonstration of OK and APPLY (1.23 KB, patch)
2013-11-28 16:09 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description markiewb 2013-09-13 19:54:40 UTC
Created attachment 140066 [details]
shows the dialog which popped up

I made changes to Java Code completion options. After closing the options dialog this dialog (see screenshot) pops up. I did not touch any C++ options panel.

Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Lou Dasaro 2013-09-14 21:48:50 UTC
I also received this error dialog ("no c++ compiler"). It appears that applying/closing the Tools->Options dialog causes the C/C++ plugin to activate/initialize.

To produce the anomaly:
1. Install NB RC1 SE or EE ( e.g. netbeans-7.4rc1-javase-windows )
2. Go to Plugins->Available Plugins and install the C/C++ plugin.
3. Close the Plugins window and go to Tools->Options (General)
4. Change Proxy Settings to No Proxy. (Change "something")
5. Click "Apply" for the Options dialog and then Click "Close"
6. The error contained in the attachment "shows the dialog which popped up" appears, usually after the apply, or sometimes after the close (depending on ???).

I don't think it matters what you actually do in the Options dialog, so long as you change _something_ and click apply. This causes the C/C++ plugin to initialize, which brings the popup.

In the "FULL" release (netbeans-7.4rc1-windows_full), this popup correctly appears when you activate the C/C++ plugin in Tools->Plugins->Installed or when you activate it in Tools->Options->C/C++. 

Environment:
Product Version: NetBeans IDE 7.4 RC1 (Build 201309112301) (SE or EE)
Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 8 version 6.2 running on x86; Cp1252; en_US (nb)
Comment 2 Lou Dasaro 2013-09-14 21:54:51 UTC
I think the real issue is that accessing Tools->Options should not cause the C/C++ plugin to initialize unless you actually clicked on the C/C++ tab in Tools->Options and clicked "Activate".
Comment 3 Alexander Simon 2013-09-26 09:30:33 UTC
Reassign to evaluation.
Comment 4 Alexander Simon 2013-09-26 09:33:26 UTC
CND controller
org.netbeans.modules.cnd.toolchain.ui.options.ToolsPanelController
is not activated by itself.
Comment 5 Theofanis Oikonomou 2013-09-27 10:11:58 UTC
(In reply to mr_lou_d from comment #2)
> I think the real issue is that accessing Tools->Options should not cause the
> C/C++ plugin to initialize unless you actually clicked on the C/C++ tab in
> Tools->Options and clicked "Activate".

You already have activated c/c++ manually in step 2 of comment 1, so options does not do this on it's own. It also does not show the dialog. This is done by org.netbeans.modules.cnd.toolchain.compilerset.CompilerSetManagerAccessorImpl

It uses SwingUtilities.invokeLater and this is why you not always get the dialog the exact same time. re-assigning for evaluation. Thank you
Comment 6 Alexander Simon 2013-09-27 11:03:34 UTC
(In reply to Theofanis Oikonomou from comment #5)
> (In reply to mr_lou_d from comment #2)
> > I think the real issue is that accessing Tools->Options should not cause the
> > C/C++ plugin to initialize unless you actually clicked on the C/C++ tab in
> > Tools->Options and clicked "Activate".
> 
> You already have activated c/c++ manually in step 2 of comment 1, so options
> does not do this on it's own. It also does not show the dialog. This is done
> by
> org.netbeans.modules.cnd.toolchain.compilerset.CompilerSetManagerAccessorImpl
> 
> It uses SwingUtilities.invokeLater and this is why you not always get the
> dialog the exact same time. re-assigning for evaluation. Thank you
This is stack of init() and getComponent() of inactive ToolsPanelController
after "Apply" button:

java.lang.Exception
	at org.netbeans.modules.cnd.toolchain.ui.options.ToolsPanelController.<init>(ToolsPanelController.java:65)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:712)
	at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:549)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:944)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:940)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:877)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:798)
	at org.netbeans.core.startup.layers.BinaryFS$FileMap.get(BinaryFS.java:1128)
	at org.netbeans.spi.options.AdvancedOption$1.call(AdvancedOption.java:146)
	at org.netbeans.spi.options.AdvancedOption$1.call(AdvancedOption.java:144)
	at org.netbeans.modules.options.AdvancedOptionImpl.create(AdvancedOptionImpl.java:102)
	at org.netbeans.modules.options.TabbedController.handleTabSwitched(TabbedController.java:206)
	at org.netbeans.modules.options.TabbedController.initTabbedPane(TabbedController.java:187)
	at org.netbeans.modules.options.TabbedController.getComponent(TabbedController.java:168)
	at org.netbeans.modules.options.CategoryModel$Category.getComponent(CategoryModel.java:431)
	at org.netbeans.modules.options.CategoryModel$Category.update(CategoryModel.java:391)
	at org.netbeans.modules.options.CategoryModel.update(CategoryModel.java:214)
	at org.netbeans.modules.options.OptionsPanel$2.run(OptionsPanel.java:304)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.lang.Exception
	at org.netbeans.modules.cnd.toolchain.ui.options.ToolsPanelController.getComponent(ToolsPanelController.java:100)
	at org.netbeans.modules.options.TabbedController.handleTabSwitched(TabbedController.java:209)
	at org.netbeans.modules.options.TabbedController.initTabbedPane(TabbedController.java:187)
	at org.netbeans.modules.options.TabbedController.getComponent(TabbedController.java:168)
	at org.netbeans.modules.options.CategoryModel$Category.getComponent(CategoryModel.java:431)
	at org.netbeans.modules.options.CategoryModel$Category.update(CategoryModel.java:391)
	at org.netbeans.modules.options.CategoryModel.update(CategoryModel.java:214)
	at org.netbeans.modules.options.OptionsPanel$2.run(OptionsPanel.java:304)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:694)
	at java.awt.EventQueue$3.run(EventQueue.java:692)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Why option controller does activate not active tab?
Comment 7 Theofanis Oikonomou 2013-09-27 11:31:45 UTC
(In reply to Alexander Simon from comment #6)
> (In reply to Theofanis Oikonomou from comment #5)
> > (In reply to mr_lou_d from comment #2)
> > > I think the real issue is that accessing Tools->Options should not cause the
> > > C/C++ plugin to initialize unless you actually clicked on the C/C++ tab in
> > > Tools->Options and clicked "Activate".
> > 
> > You already have activated c/c++ manually in step 2 of comment 1, so options
> > does not do this on it's own. It also does not show the dialog. This is done
> > by
> > org.netbeans.modules.cnd.toolchain.compilerset.CompilerSetManagerAccessorImpl
> > 
> > It uses SwingUtilities.invokeLater and this is why you not always get the
> > dialog the exact same time. re-assigning for evaluation. Thank you
> This is stack of init() and getComponent() of inactive ToolsPanelController
> after "Apply" button:
> 
> 
> Why option controller does activate not active tab?

what do you mean not active tab? Do you mean not currently showing? In users steps I see that he manually installs c++ support. When I install the full ide nothing happens when I press Apply button. When the Apply button is pressed all enabled controllers are asked to update their stuff.
Comment 8 Theofanis Oikonomou 2013-09-30 08:38:17 UTC
If c/c++ support is on and Apply/OK buttons are pressed in the options window then all activated controllers are asked to save their data even if they are not the ones that are currently shown.

I cannot reproduce if c/c++ support is not installed or activated. User in comment 1 manually installs c/c++ support in step 2. I am not sure how the stacktrace from comment 6 was generated but even in that case c/c++ support must have already been activated. Please file a new bug with steps to follow if you can reproduce. 

Alexander please evaluate in which cases you need to show the dialog. Thank you
Comment 9 Alexander Simon 2013-09-30 11:54:00 UTC
(In reply to Theofanis Oikonomou from comment #8)
> If c/c++ support is on and Apply/OK buttons are pressed in the options
> window then all activated controllers are asked to save their data even if
> they are not the ones that are currently shown.
> 
> I cannot reproduce if c/c++ support is not installed or activated. User in
> comment 1 manually installs c/c++ support in step 2. I am not sure how the
> stacktrace from comment 6 was generated but even in that case c/c++ support
> must have already been activated. Please file a new bug with steps to follow
> if you can reproduce. 
> 
> Alexander please evaluate in which cases you need to show the dialog. Thank
> you
Options panel has following bugs:
1. Closed Options panel activates C/C++ controller.
Steps to reproduce:
- IDE has inactive C/C++.
- Open Options panel, change anything, press apply and OK.
- Activate C/C++.
Options panel call C/C++ controller.
It is a random bug.
Stack:
org.netbeans.modules.cnd.toolchain.ui.options.ToolsPanelController.getComponent(ToolsPanelController.java:96)
org.netbeans.modules.options.TabbedController.handleTabSwitched(TabbedController.java:209)
org.netbeans.modules.options.TabbedController.initTabbedPane(TabbedController.java:187)
org.netbeans.modules.options.TabbedController.access$100(TabbedController.java:79)
org.netbeans.modules.options.TabbedController$1$1.run(TabbedController.java:94)
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
java.awt.EventQueue.access$200(EventQueue.java:103)
java.awt.EventQueue$3.run(EventQueue.java:694)
java.awt.EventQueue$3.run(EventQueue.java:692)
java.security.AccessController.doPrivileged(AccessController.java)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
java.security.AccessController.doPrivileged(AccessController.java)
java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
java.awt.Dialog.show(Dialog.java:1082)
org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1078)
org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1128)
org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1100)
org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:128)
org.openide.util.Mutex.doEventAccess(Mutex.java:1368)
org.openide.util.Mutex.readAccess(Mutex.java:278)
org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1085)
java.awt.Component.show(Component.java:1651)
java.awt.Component.setVisible(Component.java:1603)
java.awt.Window.setVisible(Window.java:1014)
java.awt.Dialog.setVisible(Dialog.java:1005)
org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard.invokeWizardImpl(UninstallUnitWizard.java:94)
org.netbeans.modules.autoupdate.ui.wizards.UninstallUnitWizard.invokeWizard(UninstallUnitWizard.java:72)
org.netbeans.modules.autoupdate.ui.UnitTab$ActivateAction.performerImpl(UnitTab.java:1457)
org.netbeans.modules.autoupdate.ui.UnitTab$TabAction.actionPerformed(UnitTab.java:1120)
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
java.awt.Component.processMouseEvent(Component.java:6505)
javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
java.awt.Component.processEvent(Component.java:6270)
java.awt.Container.processEvent(Container.java:2229)
java.awt.Component.dispatchEventImpl(Component.java:4861)
java.awt.Container.dispatchEventImpl(Container.java:2287)
java.awt.Component.dispatchEvent(Component.java:4687)
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
java.awt.Container.dispatchEventImpl(Container.java:2273)
java.awt.Window.dispatchEventImpl(Window.java:2719)
java.awt.Component.dispatchEvent(Component.java:4687)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
java.awt.EventQueue.access$200(EventQueue.java:103)
java.awt.EventQueue$3.run(EventQueue.java:694)
java.awt.EventQueue$3.run(EventQueue.java:692)
java.security.AccessController.doPrivileged(AccessController.java)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
java.awt.EventQueue$4.run(EventQueue.java:708)
java.awt.EventQueue$4.run(EventQueue.java:706)
java.security.AccessController.doPrivileged(AccessController.java)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

2. C/C++ has a specific options that has a long initialization time.
The initialization task is posted when C/C++ tab controller is instantiated.
Options panel initializes C/C++ tab controller despite the fact that C/C++ options panel was not activated.
It is a 100% repeatable bug.
Steps to reproduce:
- IDE has active C/C++.
- Open Options panel, change anything in general panel, press apply.
Options panel call C/C++ controller.
Comment 10 Theofanis Oikonomou 2013-09-30 14:40:01 UTC
(In reply to Alexander Simon from comment #9)
> (In reply to Theofanis Oikonomou from comment #8)
> > If c/c++ support is on and Apply/OK buttons are pressed in the options
> > window then all activated controllers are asked to save their data even if
> > they are not the ones that are currently shown.
> > 
> > I cannot reproduce if c/c++ support is not installed or activated. User in
> > comment 1 manually installs c/c++ support in step 2. I am not sure how the
> > stacktrace from comment 6 was generated but even in that case c/c++ support
> > must have already been activated. Please file a new bug with steps to follow
> > if you can reproduce. 
> > 
> > Alexander please evaluate in which cases you need to show the dialog. Thank
> > you
> Options panel has following bugs:
> 1. Closed Options panel activates C/C++ controller.
> Steps to reproduce:
> - IDE has inactive C/C++.
> - Open Options panel, change anything, press apply and OK.
> - Activate C/C++.
> Options panel call C/C++ controller.
> It is a random bug.

please file a separate bug

> ...
> 2. C/C++ has a specific options that has a long initialization time.
> The initialization task is posted when C/C++ tab controller is instantiated.
> Options panel initializes C/C++ tab controller despite the fact that C/C++
> options panel was not activated.
> It is a 100% repeatable bug.
> Steps to reproduce:
> - IDE has active C/C++.
> - Open Options panel, change anything in general panel, press apply.
> Options panel call C/C++ controller.

As I said in my previous comment this is expected. When you press apply each controller is asked to apply the changes. Then when you press ok again each controller is notified of this fact. It is up to the controler to do whatever it wants at this point. For example if your long-lasting initialization stuff has not finished and the user closes the options dialog you should cancel all processing and not show the pop-up dialog.
Comment 11 Alexander Simon 2013-09-30 15:10:33 UTC
(In reply to Theofanis Oikonomou from comment #10)
> (In reply to Alexander Simon from comment #9)
> > (In reply to Theofanis Oikonomou from comment #8)
> > > If c/c++ support is on and Apply/OK buttons are pressed in the options
> > > window then all activated controllers are asked to save their data even if
> > > they are not the ones that are currently shown.
> > > 
> > > I cannot reproduce if c/c++ support is not installed or activated. User in
> > > comment 1 manually installs c/c++ support in step 2. I am not sure how the
> > > stacktrace from comment 6 was generated but even in that case c/c++ support
> > > must have already been activated. Please file a new bug with steps to follow
> > > if you can reproduce. 
> > > 
> > > Alexander please evaluate in which cases you need to show the dialog. Thank
> > > you
> > Options panel has following bugs:
> > 1. Closed Options panel activates C/C++ controller.
> > Steps to reproduce:
> > - IDE has inactive C/C++.
> > - Open Options panel, change anything, press apply and OK.
> > - Activate C/C++.
> > Options panel call C/C++ controller.
> > It is a random bug.
> 
> please file a separate bug
It is exactly first user scenario.
> 
> > ...
> > 2. C/C++ has a specific options that has a long initialization time.
> > The initialization task is posted when C/C++ tab controller is instantiated.
> > Options panel initializes C/C++ tab controller despite the fact that C/C++
> > options panel was not activated.
> > It is a 100% repeatable bug.
> > Steps to reproduce:
> > - IDE has active C/C++.
> > - Open Options panel, change anything in general panel, press apply.
> > Options panel call C/C++ controller.
> 
> As I said in my previous comment this is expected. When you press apply each
> controller is asked to apply the changes. Then when you press ok again each
> controller is notified of this fact.
It is not true.
When user press OK or Cancel only active controllers are notified.
The button Apply has different behavior: all controllers  are notified.
Please make behavior the same (as OK do).
Comment 12 Theofanis Oikonomou 2013-11-28 15:18:39 UTC
(In reply to Alexander Simon from comment #11)
> (In reply to Theofanis Oikonomou from comment #10)
> > (In reply to Alexander Simon from comment #9)
> > > (In reply to Theofanis Oikonomou from comment #8)
> > > > If c/c++ support is on and Apply/OK buttons are pressed in the options
> > > > window then all activated controllers are asked to save their data even if
> > > > they are not the ones that are currently shown.
> > > > 
> > > > I cannot reproduce if c/c++ support is not installed or activated. User in
> > > > comment 1 manually installs c/c++ support in step 2. I am not sure how the
> > > > stacktrace from comment 6 was generated but even in that case c/c++ support
> > > > must have already been activated. Please file a new bug with steps to follow
> > > > if you can reproduce. 
> > > > 
> > > > Alexander please evaluate in which cases you need to show the dialog. Thank
> > > > you
> > > Options panel has following bugs:
> > > 1. Closed Options panel activates C/C++ controller.
> > > Steps to reproduce:
> > > - IDE has inactive C/C++.
> > > - Open Options panel, change anything, press apply and OK.
> > > - Activate C/C++.
> > > Options panel call C/C++ controller.

this is expected, see my answer at the bottom

> > > It is a random bug.
> > 
> > please file a separate bug
> It is exactly first user scenario.

I do not understand. AFAICT both users follow the following steps:
1) install/activate/enable/or whatever you may call it c/c++ support via Tools->Plugins or Tools->Options->c/c++->Activate button
2) modify some options under General, it does not really matter
3) press Apply
4) close the options window

IMO this is the exact oposite from what you are describing, which I cannot reproduce

> > 
> > > ...
> > > 2. C/C++ has a specific options that has a long initialization time.
> > > The initialization task is posted when C/C++ tab controller is instantiated.
> > > Options panel initializes C/C++ tab controller despite the fact that C/C++
> > > options panel was not activated.
> > > It is a 100% repeatable bug.
> > > Steps to reproduce:
> > > - IDE has active C/C++.

by active you mean... see step 1 above in my answer

> > > - Open Options panel, change anything in general panel, press apply.
> > > Options panel call C/C++ controller.

this is expected, see my answer at the bottom

> > 
> > As I said in my previous comment this is expected. When you press apply each
> > controller is asked to apply the changes. Then when you press ok again each
> > controller is notified of this fact.
> It is not true.
> When user press OK or Cancel only active controllers are notified.
> The button Apply has different behavior: all controllers  are notified.

This is not accurate.
When OK/Cancel is pressed applyChanges()/cancel() is called on every controller
When Apply is pressed applyChanges()and update() is called on every controller
Maybe when you say active you mean something different that what I describe in step 1 above in my answer?
If this is the case please eleborate.
IMHO it is correct behavior to notify every controler whether it is the one showing or not that the user
pressed Apply, OK or Cancel.

> Please make behavior the same (as OK do).

The behavior cannot be the same as when you press Apply the options window must update its content and stay open.
Comment 13 Alexander Simon 2013-11-28 16:09:11 UTC
Created attachment 142689 [details]
Demonstration of OK and APPLY

You can check declared behavior:

When OK/Cancel is pressed applyChanges()/cancel() is called on every controller
When Apply is pressed applyChanges()and update() is called on every controller

by own.

Steps:
- apply patch
- rebuild cnd.toolchain module
- start IDE

- open options dialog and change proxy settings in general tab.
- press OK. There is no output in system err.

- open options dialog and change proxy settings in general tab.
- press APPLY. See output in system err:
ToolsPanelController.update()
Comment 14 Theofanis Oikonomou 2014-02-07 13:46:01 UTC
(In reply to Alexander Simon from comment #13)
> 
> Steps:
> - apply patch

if you add similar system err in say GeneralEditorPanelController in options.editor module for example you will see the same behavior.

> - rebuild cnd.toolchain module
> - start IDE
> 
> - open options dialog and change proxy settings in general tab.
> - press OK. There is no output in system err.

This is because ToolsPanelController or GeneralEditorPanelController has not been "updated" by the infrastructure yet, as they are not shown yet. This changes if you click Apply though, as update() is invoked over all controllers, as you see in your next step

> 
> - open options dialog and change proxy settings in general tab.
> - press APPLY. See output in system err:
> ToolsPanelController.update()

if you furthermore press OK button you will have in the output something like:

GeneralEditorPanelController.update()
ToolsPanelController.update()
GeneralEditorPanelController.applyChanges()
ToolsPanelController.applyChanges()

anyway the problem is in the timing when the "No Compilers found" dialog is shown. I am not really sure where this dialog is supposed to be shown and when. I guess similar logic should be applied during project creation or customization? If the dialog is to be shown in more cases or from multiple locations then I guess some new api is needed to let CompilerSetManagerAccessorImpl know if it is supposed to show the dialog or not. Thanks
Comment 15 Alexander Simon 2016-06-14 12:29:41 UTC
We cannot fix this in cnd side.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo