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.
Build: NetBeans IDE 6.0 Beta 1 (Build 200709141330) VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06 OS: Windows XP, 5.1, x86 User Comments:
Created attachment 51204 [details] stacktrace
exception itself doesn't help us to fix bug. Could you provide exact steps how to reproduce it ? StackTrace for better query: =========== java.lang.NullPointerException at org.netbeans.modules.form.CodeCustomEditor.<init>(CodeCustomEditor.java:95) at org.netbeans.modules.form.RADConnectionPropertyEditor.getCustomEditor(RADConnectionPropertyEditor.java:143) at org.netbeans.modules.form.FormCustomEditor.<init>(FormCustomEditor.java:151) at org.netbeans.modules.form.FormPropertyEditor.getCustomEditor(FormPropertyEditor.java:270)
The exception is thrown by the following code: SimpleSection sec = dobj.getFormEditorSupport().getInitComponentSection(); ... codePos = sec.getText().indexOf(codeSnippet); <- NPE So, the "initComponentc" guarded block is not found in the .java file. Do you see this guarded block (non-editable area around initComponents() method) in the source code? Did you edit this .java file in external editor? Any chance that you removed //GEN-BEGIN:initComponents and //GEN-END:initComponents comments using some external (=outside NetBeans) tool?
I am sorry, I am not able to reproduce this issue => closing as WORKSFORME. Feel free to reopen it if you are still able to reproduce it, but provide exact steps to reproduce then.
Build: NetBeans IDE 6.0 RC2 (Build 200711201000) VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05 OS: Windows XP, 5.1, x86 User Comments: When attempting to change the border style on a jpanel by clicking on the [...] button next to the border property in the properties pane in the Gui designer using a Gridbag.
Created attachment 53728 [details] stacktrace
This issue has also been raised on the nbusers forum: http://www.nabble.com/Problem-with-the-%27more%27-buttons-on-the-properties-sheet-after-adding-UML-markers-td15248390.html
As per http://www.nabble.com/Problem-with-the-%27more%27-buttons-on-the-properties-sheet-after-adding-UML-markers-td15248390.html : > I think it happened when Netbeans inserted the UML markers.
When Netbeans added UML Markers to my code, it changed the guarded block. When I tried to edit my gui, all of the "..." buttons threw an exception. When I followed the instructions to report the problem, I was led to this issue stating that it had been fixed and I should try updating. I have the current update but the problem still occurs. The change to the guarded block is as follows: /** * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. * <editor-fold defaultstate="collapsed" desc="Generated Code">GEN-BEGIN:initComponents */ // <editor-fold defaultstate="collapsed" desc=" UML Marker "> // #[regen=yes,id=DCE.6EE9EE88-47E7-0631-86EA-5CD0787277E1] // </editor-fold> private void initComponents () { . . .
Reopening the issue, since more info has been provided; adding UML markers seems to be one way to reproduce this problem.
I have requested the user on nbusers forum to provide us with steps to reproduce this problem. When we do have a testcase, we should raise the priority to P2 (since this bug leads to mangling of source code) and remove the 'INCOMPLETE' keyword. In the meantime, form or UML QE may want to try and reproduce the problem. (Right now, it is not clear whether this is a UML issue, caused only by adding UML markers, or it is an underlying form module issue of which adding UML marker is just one usecase).
Here are the steps that created the problem: In the projects window,selected a UML element of type FrameView; right-clicked and selected Generate Code...; with all defaults selected (the 'add merge markers to existing elements' was checked), clicked the OK button. At that point, I only observed the results and then left the project for a few days, so my recollection of the steps may be vague.
Raising the priority to P2 , removing the INCOMPLETE keyword and reassigning to uml component.
The problem isn't in markers. During RE the "//" in //GEN-BEGIN:initComponents is filtered out.
THIS ISSUE HAS ALREADY 20 DUPLICATES
Fixed. Corrected removal of "//" in //GEN-BEGIN:initComponents and avoid touching the elements that have the Netbeans gen marker in the comments. Checking in uml/core/src/org/netbeans/modules/uml/core/reverseengineering/refram ework/parsingframework/CommentGather.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/reframework/p arsingframework/Attic/CommentGather.java,v <-- CommentGather.java new revision: 1.2.6.4; previous revision: 1.2.6.3 done Checking in uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsin gfacilities/translation/statehandlers/StateHandler.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacili ties/translation/statehandlers/Attic/StateHandler.java,v <-- StateHandler.java new revision: 1.2.6.3; previous revision: 1.2.6.2 done Checking in uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Elemen tMatcher.java; /cvs/uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Attic/Element Matcher.java,v <-- ElementMatcher.java new revision: 1.1.2.4; previous revision: 1.1.2.3 done Checking in uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Merger .java; /cvs/uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Attic/Merger. java,v <-- Merger.java new revision: 1.1.2.6; previous revision: 1.1.2.5 and changeset d432596a24e2 in main details: http://hg.netbeans.org/main?cmd=changeset;node=d432596a24e2 description: Fix for 119335 java.lang.NullPointerException
Repro steps that took me to the exception in NB6.0 without the fix to this bug. - create a Java Application project with defaults - create a JFrame Form in the javaapplication package with the default form name - when the Form Design editor opens, click on the Source button above the design window to switch to the source - reverse engineer from the source editor to a new UML project - expand nodes in the re'ed UML project to the NewJFrame class node - right click on the NewJFrame class node and select Generate Code - from the Generate Code dialog, select the Java Application from the 1st step as the Target Project - leave all default checks alone - check the checkbox for "Add Merge Markers to Existing Source Elements" - click on the OK button to generate code - now go back to the design editor by clicking on the Design button above the source window to switch to the form design editor - click on the frame to select it - from the properties window for the selected frame, click on any of the "..." buttons - now you will notice the flashing red button at the lower-right corner of the ide, click on the flashing red button to popup the exception dialog Verified in NB 6.1 M2 latest build netbeans-hudson-trunk-778 (20080229154759). Repeating the same steps above will bring up the dialog for the corresponding "..." button when clicked w/o exception.
The fix has been ported into the release601_fixes branch. Checking in codegen/src/org/netbeans/modules/uml/codegen/java/merging/ElementMatcher.java; /cvs/uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Attic/ElementMatcher.java,v <-- ElementMatcher.java new revision: 1.11.8.1; previous revision: 1.11 done Checking in codegen/src/org/netbeans/modules/uml/codegen/java/merging/Merger.java; /cvs/uml/codegen/src/org/netbeans/modules/uml/codegen/java/merging/Attic/Merger.java,v <-- Merger.java new revision: 1.19.8.2; previous revision: 1.19.8.1 done Checking in core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacilities/translation/statehandlers/StateHandler.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacilities/translation/statehandlers/Attic/StateHandler.java,v <-- StateHandler.java new revision: 1.7.8.1; previous revision: 1.7 done Checking in core/src/org/netbeans/modules/uml/core/reverseengineering/reframework/parsingframework/CommentGather.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/reframework/parsingframework/Attic/CommentGather.java,v <-- CommentGather.java new revision: 1.6.6.1; previous revision: 1.6 done
Reopening - reproduced in NetBeans IDE 6.1 (Build 200804211638) http://statistics.netbeans.org/exceptions/detail.do?id=128667
can't reproduce in 6.1 (and 6.5 also) may not be related to uml module. can anybody provide steps to reproduce?
move back to form module for evaluation
Given that we can't reproduce it and there is no report for 6.5, closing as WORKSFORME.