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 31762 - Setup Wizard depends on the garbage collector
Summary: Setup Wizard depends on the garbage collector
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: ARCH
Depends on:
Blocks:
 
Reported: 2003-03-07 09:45 UTC by David Konecny
Modified: 2008-12-22 18:48 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2003-03-07 09:45:40 UTC
WizardPanels of the Setup Wizard are defined as
instances on the SystemFS and there is no way how
to "reset" the instance once it was created apart
from waiting till it was garbage collected. The
sideeffect of this behaviour can be seen this way:
* open Options Dialog and check the value of WWW
Broser in System Settings
* open SetupWizard(SW) and check the value of WWW
Broser. The value should be same as in System
Settings (depends on the issue 31730 which I just
fixed)
* close the SW, modify value in System Settings to
some other browse and open SW

The SW may still contain the old value. The reason
is that panel (IDESettingsPanel) was not recreated
for the second opening of the SW, but the same
instance as in the first opening is still used. If
you force garbage collecting before opening SW
second time then everything is OK - the panel is
garbage collected and recreated (just add some
logging into IDESettingsPanel.finished() to see
when it is called and when not).

This is architecture problem I guess. Putting
instance of the WizardDescriptor.Panel into
systemFS is OK, but there is no method which could
be used to reset the instance instead of relying
on garbage collector. Possible hack could be to
use IntanceDataObject representing the instance
and use setValid(false) which should force its
recreation. 

FYI: this problem is not relevant for instances of
TemplateWizard.Iterator which has method
initiliaze() and uninitialize() which are used for
recreating of panels. But using of TW.I is not an
option here I guess.

Filing this for record, but marking it P4 - the
user should not stumble over it often. Should be
also solved by wizard redesign. Adding Yarda on
CC, he might have an idea.
Comment 1 _ rkubacki 2003-03-07 10:31:00 UTC
would it be better to set browser when the panel is displayed rather
than when it is created?
Comment 2 David Konecny 2003-03-07 10:51:24 UTC
Sounds like possible workaround. Thx. There should be probably some
place where to hang your listener or where to override something to
learn that component is going to be shown, going to be hide and do the
selection there.

Just do not forget to do it in synch with the performance improvements
- I mean in synch with AsynchGUIJob. :-)
Comment 3 Jiri Rechtacek 2004-01-06 09:09:52 UTC
No changes planned to 3.6.
Comment 4 Marian Mirilovic 2004-12-21 09:24:52 UTC
I can't reproduce it in NB4.1 (200412191900), ...
Comment 5 Jiri Rechtacek 2005-12-06 09:05:19 UTC
SetupDialog is dead since NB5.0