apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.68k stars 853 forks source link

right-click in Swing form, select "Events". . . . (choose event type) #7503

Open PaulAnderson-One opened 5 months ago

PaulAnderson-One commented 5 months ago

Apache NetBeans version

Apache NetBeans 22

What happened

  1. create a swing form
  2. drop any component (I used CheckBox)
  3. right click, choose Events . . . . navigate to any event (I used PropertChage .. . propertyChange

bug behavior starts here.

What does happen: the edit tab for the file in question changes to bold (i.e. file changed), but there is no change at all

what should happen: it should creat an event-fired stub, and add the appropriate listener

Language / Project Type / NetBeans Component

Java UI form designer

How to reproduce

  1. create a swing form
  2. drop any component (I used CheckBox)
  3. right click, choose Events . . . . navigate to any event (I used PropertChage .. . propertyChange

bug behavior starts here.

What does happen: the edit tab for the file in question changes to bold (i.e. file changed), but there is no change at all

what should happen: it should creat an event-fired stub, and add the appropriate listener

Did this work correctly in an earlier version?

Apache NetBeans 19

Operating System

MacOS Sonoma 14.5 (23F79)

JDK

21.0.2-zulu

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

occurs every time.

Are you willing to submit a pull request?

No

matthiasblaesing commented 5 months ago

Tested NB22 on Ubuntu Linux with OpenJDK 21 - not reproducible there. Please check the message.log if there is something relevant.

PaulAnderson-One commented 5 months ago

Thanks for the sanity check. I since found that this is specific to just one project. The logs are a bit vague. Attached as suggested in the IDE log:

: An error occurred during parsing of '/..../nextGenPerfAnalyzer/src/main/java/com/panderson/nextgenperfanalyzer/NextGenPerfAnalyzer.java'.

Please report a bug against java/source and attach dump file NextGenPerfAnalyzer_34_dump.txt '/Users/paulanderson/Library/Application Support/NetBeans/22/var/log/NextGenPerfAnalyzer_34.dump'.

The relevant line is Caused by: java.lang.AssertionError: Analyzer error when processing: lstMarkerPairs = new javax.swing.JList();

           :java.lang.NullPointerException: 
                 Cannot invoke "com.sun.tools.javac.code.Type.isPartial()" because "s" is null

However, I have no idea to what "s" it is referring. I'll be happy to get a pointer where to start looking if anyone has an idea

matthiasblaesing commented 4 months ago

The issue looks like a problem in the compiler. Could you please check if the release candiate for NB23 maybe fixes the problem?

See here: https://github.com/apache/netbeans/discussions/7615