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:||Lazy bean update|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
Description Chiana 2014-01-11 14:18:35 UTC
[ JDK VERSION : 1.7.0_45 ] When you have added a bean to a dialog (may it be a JPanel (tested case)) the added version is not updated until you close and reopen the dialog. To reconstruct. Create a JDialog. Create a JPanel bean. Insert the JPanel into the JDialog. Make changes to the JPanel and save (compile if not set compile at save) - - At this point the JDialog should reflect the altered JPanel, but it does not and it wont until you close the JDialog and reopen it.
Comment 1 Chiana 2014-01-11 14:26:50 UTC
Also, restarting the IDE will update the bean
Comment 2 Tomas Pavek 2014-01-13 10:47:34 UTC
This is as designed, we don't try to reload GUI forms with custom beans when the bean classes change. The main reason is probably that we don't have a reliable mechanism for detecting that a class was changed, OTOH it is quite easy for the user to reload a form (Ctrl+Shift+R or Reload action on the root form node in Navigator) when not seeing the updated bean. It is also mentioned in help and tutorials. So I'd prefer to leave it on the user's responsibility as so far instead of introducing a potentially quirky auto-reload mechanism. But we can keep this idea as an enhancement request.
Comment 3 Chiana 2014-01-23 07:15:42 UTC
But you CAN detect a source file been modified, there are time-stamps on the class-file, so if (classFileTimeStamp() > loadedClassFileTimeStamp()) reloadClass()... Also; if you have an embedded class open you can trap save action and reload that class. And finally; suggest a button on the toolbar in the editor window that says "Reload class", just having the action in the navigator window isn't enough.