apache / netbeans

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

Gradle build actions NPE and visually inaccurate state #4702

Open errael opened 2 years ago

errael commented 2 years ago

Apache NetBeans version

Apache NetBeans 15

What happened

NPE and inconsistent visual state

How to reproduce

gradle projects are created with NewProject > JavaWithGradle > JavaClassLibrary

Get to this dialog with GradleProject > properties > Build > BuildActions

First note that although nothing is selected in the ConfiguredActions list, both the Disable and Reset buttons are enabled. Note that when this first comes up is the only time the configuration details shows up without a ConfiguredActions selection. If you select an action, then deselect, CTRL click, you will see No Selected Action. I like seeing the details area when it first comes up to get an idea of what you can do with an action. But if only came up when something was selected, then there would be no issue with the Reset button.

The rest of this is about stuff that seems/looks wrong, but I'm not familiar enough with this dialog to be certain. For example, what does boldface mean in Configured Actions list? Should some actions start in a disabled state or is there a reason that Restore doesn't restore?

Starting with fresh project

Following doesn't really belong in this report

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux harmony 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1

JDK

openjdk version "11.0.2" 2019-01-15

Apache NetBeans packaging

Own source build

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

errael commented 2 years ago

Fix for the NPE in #4703 .

@lkishalmi , @sdedic Since I'm not sure what is proper behavior... Even the NPE fix could be handled differently by coming up with "nothing selected".

errael commented 2 years ago

@mbien , can this be reopened? The "NPE" is fixed but the "visually inaccurate state" is pending; need some feedback on what is proper behavior. The opening comment outlines some inconsistencies in the dialog, and I'm not sure what it's supposed to do.

mbien commented 2 years ago

sure