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

Improving the Java AST debugging view. #4879

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

jlahoda
Copy link
Contributor

@jlahoda jlahoda commented Oct 29, 2022

The AST debug view for Java (java/java.debug) has some trouble:

  • it has hardcoded all AST node kinds, so if a new AST node kind is added, it needs an update
  • the highlight showing the current AST node's span is not cleared when the view is unselected
  • the highlight color is really ugly

This patch attempts to improve these aspects.


^Add meaningful description above

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

@jlahoda jlahoda added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Oct 29, 2022
@jlahoda jlahoda added this to the NB17 milestone Oct 29, 2022
@mbien
Copy link
Member

mbien commented Dec 15, 2022

how can I use the debugging module? Build it separately and install it in the IDE?

@jlahoda
Copy link
Contributor Author

jlahoda commented Dec 16, 2022

In Navigator for Java source files, there should be a few debugging panels, like Trees (NetBeans Development), which this patch is updating. This is part of the standard build, but is only enabled when assertions are enabled, or -J-Dorg.netbeans.modules.java.debug.enable=true command line option is used.

@mbien mbien added the Editor label Jan 14, 2023
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code makes sense to me as far as I can tell. It works also as advertised.

learned something new, this certainly is a useful tool to debug some editor features.

lets get this in - should be low risk anyway since this is not enabled by default..

@mbien mbien merged commit d72bbab into apache:master Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants