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

A flag to resolve codeSelect using ASTParser #2700

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

mickaelistria
Copy link
Contributor

What it does

Introduce a CompilationUnit.DOM_BASED_OPERATIONS flag which instead of using the ECJ-derived parser uses ASTParser to create a DOM and then uses the DOM to implement codeSelect

This has the benefit of:

  • Simplifying the code as an crawling DOM is usually simpler than dealing with lower-level parser
  • allowing other parsers as backend if ASTParser is configured for it

How to test

Set system property -DCompilationUnit.DOM_BASED_OPERATIONS=true and see codeSelect (hover, ctrl+click) working with ASTParser.

Author checklist

Introduce a CompilationUnit.DOM_BASED_OPERATIONS flag which instead of
using the ECJ-derived parser uses ASTParser to create a DOM and then
uses the DOM to implement codeSelect

This has the benefit of:
* Simplifying the code as an crawling DOM is usually simpler than
dealing with lower-level parser
* allowing other parsers as backend if ASTParser is configured for it
@jjohnstn jjohnstn self-assigned this Oct 18, 2024
@jjohnstn jjohnstn added the enhancement New feature or request label Oct 18, 2024
@jjohnstn jjohnstn added this to the 4.34 M2 milestone Oct 18, 2024
Copy link
Contributor

@jjohnstn jjohnstn left a comment

Choose a reason for hiding this comment

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

Seeing this as being part of the javac effort and is completely distinct from regular JDT compiler without special flag, LGTM.

@jjohnstn jjohnstn merged commit a3e8ece into eclipse-jdt:master Oct 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants