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

Move the DOM-based search into the javac bundle #1221

Merged

Conversation

robstryker
Copy link

No description provided.

@mickaelistria
Copy link

That can make a lot of sense for now.
Was the suggested extension point already submitted upstream?

@robstryker
Copy link
Author

Extension point is already submitted upstream but not yet merged.

This branch will likely need a careful application when being merged, so please (when appropriate) just give your approval but do not merge it yourself. I will handle it.

This PR is slightly different from the upstream one, and we may need to reorder the commits so as to minimize the affects.

@robstryker robstryker force-pushed the moveDOMSearchToJavacBundle branch from 4fd4717 to 2ce4b23 Compare February 7, 2025 18:12
@robstryker robstryker force-pushed the moveDOMSearchToJavacBundle branch 2 times, most recently from e05d5af to 77abe2a Compare February 7, 2025 19:55
Extra strategy in MatchLocator to use DOM, and tweaks in various
Locators to properly handle DOM. Tests in JavaSearchTests help a lot
(currently ~130/270 passing)

It basically clones and adapt some methods and adapt them to DOM,
A new flag is introduced to decide the strategy.

Done-ish (often with remaining issues)
* FieldLocator
* LocalVariableLocator
* MethodLocator
* SuperTypeReferenceLocator
* TypeDeclarationLocator
* TypeParameterLocator
* TypeReferenceLocator
TODO:
* AndLocator
* ModuleLocator
* PackageDeclarationLocator
* PackageReferenceLocator
* OrLocator
* VariableLocator

Make some match locator work with DOM

Fix NPE, convert 4 errors to fails

Signed-off-by: Rob Stryker <[email protected]>

Handle match files in the order they arrived

Signed-off-by: Rob Stryker <[email protected]>

Fix testBug251827b and 5 others - import declarations java element must be found

Signed-off-by: Rob Stryker <[email protected]>

Move the DOM-based search into the javac bundle

Signed-off-by: Rob Stryker <[email protected]>

Cleanup

Signed-off-by: Rob Stryker <[email protected]>
@robstryker robstryker force-pushed the moveDOMSearchToJavacBundle branch from 77abe2a to 8b6d476 Compare February 7, 2025 19:57
@robstryker robstryker merged commit d97d720 into eclipse-jdtls:dom-with-javac Feb 7, 2025
5 of 7 checks passed
@robstryker
Copy link
Author

This was a bit messy, but I ended up removing the following commits from history:

  • 0595211439 - Fix testBug251827b and 5 others - import declarations java element must be found (25 minutes ago)
  • fa7d492 - Handle match files in the order they arrived
  • 65a7ea1 - Fix NPE, convert 4 errors to fails
  • 8ce1472b8b - Make some match locator work with DOM (25 minutes ago)
  • 028f148 - Make MatchLocator capable of working with DOM (10 hours ago)

Then I cherry-picked them as part of this PR, and then I squashed some together.

So this PR included the commit still up for submission at jdt.core main repo (extension point) and the next 6 commits rebased, cleaned up, and squashed.

So... that... looks good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants