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 240280 - Lazy bean update
Summary: Lazy bean update
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
: 245056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-11 14:18 UTC by Chiana
Modified: 2014-06-18 13:19 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 4 Tomas Pavek 2014-06-18 13:19:44 UTC
*** Bug 245056 has been marked as a duplicate of this bug. ***