Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven hints can't be enabled again after they were disabled #5165

Closed
mbien opened this issue Dec 29, 2022 · 1 comment · Fixed by #5009
Closed

Maven hints can't be enabled again after they were disabled #5165

mbien opened this issue Dec 29, 2022 · 1 comment · Fixed by #5009
Labels
hints kind:bug Bug report or fix Maven [ci] enable "build tools" tests

Comments

@mbien
Copy link
Member

mbien commented Dec 29, 2022

Apache NetBeans version

Apache NetBeans 16

What happened

The org.netbeans.modules.maven.hints.pom.HintsPanelLogic and it's HintsPanel have some issues noticing when their state changes.

how it seems to work:

  • the logic polls all child panels twice per second and asks if something changed
  • based on that information it decides when to enable the apply button
  • it also decides what to do on cancel or on ok

apply and cancel was hopefully fixed in #5009 for changes within the hint panels itself.

whats left:

  • if a hint is turned off and enabled again in the same session the hint will be still off
  • this can be also seen by looking at the apply button which won't switch to enabled state when the hint is checked (-> logic doesn't know that something changed)

workaround:

  • restart NB
  • or change something else in the options panel in addition to enabling the hint (e.g warning to error)

How to reproduce

  1. open any maven hint panel
    artifact-upgrade-options
  2. disable a hint + press ok
  3. try to enable the same hint again + press ok
  4. check again if it is still enabled (it isn't)

Did this work correctly in an earlier version?

No / Don't know

Operating System

linux manjaro

JDK

19.0.1

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

Yes

Code of Conduct

Yes

@mbien mbien added kind:bug Bug report or fix Maven [ci] enable "build tools" tests hints labels Dec 29, 2022
@mbien mbien changed the title Maven hints can't be enabled again after they are turned off once Maven hints can't be enabled again after they were disabled Dec 29, 2022
@mbien mbien linked a pull request Dec 30, 2022 that will close this issue
@mbien
Copy link
Member Author

mbien commented Dec 30, 2022

I managed to fix the rest too in the same PR. Probably no need for followups assuming everything works ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hints kind:bug Bug report or fix Maven [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant