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 4199

Summary: Pre/Post initializer code not added to source code unless property editor that spawns Pre/Post code editor has something changed.
Product: guibuilder Reporter: _ tboudreau <tboudreau>
Component: CodeAssignee: _ tboudreau <tboudreau>
Status: CLOSED FIXED    
Severity: normal    
Priority: P4    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ tboudreau 1999-10-05 20:42:49 UTC
Create a form and add a JTree.
In the Component Inspector, open the property editor for the Model property.
Click Advanced to open the Pre/Post Initializer editor.
Add some preinitialization code, such as:

    DefaultMutableTreeNode node = new DefaultMutableTreeNode ();
    DefaultTreeModel model = new DefaultTreeModel (node);

Add some postInitialization code, such as:

    jTree1.setModel (model);

Click OK in both editors to close them.


The source code does not change, no pre/post init code is added.

Now, open both editors again.
Delete the PostInitialization code.
Close the Pre/Post Initialization editor by clicking OK.
Click the radio button for User Code in the model editor.
Add "model" to the text box.
Click OK to close the dialog.

The PreInitialization code is now added.  It appears that if no change is noticed by the
Model property editor, the source code is not updated.
Comment 1 Marek Grummich 2000-07-25 09:26:59 UTC
Priority is changed to P4 (normal).
Comment 2 Marian Mirilovic 2000-12-04 16:31:59 UTC
verified in [release31](20) and [boston](1160)
Comment 3 Quality Engineering 2003-07-02 15:43:14 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.