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 67549 - [50cat] NPE when adding component to refactored/moved form
Summary: [50cat] NPE when adding component to refactored/moved form
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks: 67536
  Show dependency tree
 
Reported: 2005-10-26 08:58 UTC by cbulcu
Modified: 2005-11-01 08:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the log file (18.76 KB, text/plain)
2005-10-26 09:03 UTC, cbulcu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cbulcu 2005-10-26 08:58:28 UTC
I've got NPE when putting a RadioButton on a JFrame.
java.lang.NullPointerException
[catch] at
org.netbeans.modules.form.codestructure.CodeStructure$JavaSource.getFieldNames(CodeStructure.java:1053)
Comment 1 cbulcu 2005-10-26 09:03:49 UTC
Created attachment 26341 [details]
the log file
Comment 2 Tomas Stupka 2005-10-26 09:07:56 UTC
i am sorry but i couldn't reproduce the problem.

please, could you attach the .java and .form files in the last stable state?
Comment 3 cbulcu 2005-10-26 09:16:10 UTC
I've been able to reproduce it

I opened a new project with the option create main project class. This is for it
to create a package. finish. ok

I created a new frame in the default package (right clicking on Source
Packages). I move that JFrame to the package where the main class is. Refactor,
bla, bla. Then place a component into the JFrame. That's it!
Comment 4 Marek Grummich 2005-10-26 09:48:07 UTC
It doesn't matter if it is default or other package! If you use a refactoring
move  class and then select component and place mouse cursor with a component
over design area, the exception is thrown. I have already appended this issue as
a showstopper to the #67536 - Q-Build candidate 200510251800 stoppers. Thanks!
Comment 5 Tomas Stupka 2005-10-26 11:10:22 UTC
fixed in trunk.

Checking in FormEditor.java;
/cvs/form/src/org/netbeans/modules/form/FormEditor.java,v  <--  FormEditor.java
new revision: 1.83; previous revision: 1.82
done
Checking in codestructure/CodeStructure.java;
/cvs/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java,v  <--
 CodeStructure.java
new revision: 1.16; previous revision: 1.15
Comment 6 Milan Kubec 2005-10-27 08:34:34 UTC
Please commit the fix also to Q-Build branch - QBE200510251800. Thanks.
Comment 7 Tomas Stupka 2005-10-27 09:31:22 UTC
fixed also in QBE200510251800.

Checking in FormEditor.java;
/cvs/form/src/org/netbeans/modules/form/FormEditor.java,v  <--  FormEditor.java
new revision: 1.82.2.1; previous revision: 1.82
done
Checking in codestructure/CodeStructure.java;
/cvs/form/src/org/netbeans/modules/form/codestructure/CodeStructure.java,v  <--
 CodeStructure.java
new revision: 1.15.2.1; previous revision: 1.15
done
Comment 8 Marek Grummich 2005-10-27 10:06:26 UTC
The exception seems to be fixed in the trunk build 200510261800. However, I
noticed if you place the first component to a moved form, no navigation, guide
lines are shown! And also the component is not snapped to bottom, right edge of
form (top, left only). 
Comment 9 Jan Stola 2005-10-27 11:50:23 UTC
The last problem mentioned by mgrummich has been introduced during fixing
of issue 66496. The problem occured only in trunk (not in q-build branch)
Moreover, it has been already fixed 
(/cvs/form/src/org/netbeans/modules/form/FormDesigner.java,v 
new revision: 1.161; previous revision: 1.160)
Comment 10 Marek Grummich 2005-11-01 08:26:29 UTC
Verified in the Q-build 200510311820.