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

Improve extends/implements completion #1223

Conversation

datho7561
Copy link

  • precalculate extends or implements info
  • When there is no prefix, suggest types declared in the same class, eg. suggest MyInterface in the following snippet
public class MyClass implements | {

}

interface MyInterface {}
  • Better recovery of bindings for classes with incomplete extends or implements sections

    • previously the binding key was always *, which caused many that relied on the binding key to break
  • Use ExtendsOrImplements info filtering in more places

@datho7561
Copy link
Author

Should fix 29 test cases

@datho7561 datho7561 force-pushed the dom-with-javac-improve-extends-completion branch from 5c5d36a to c4f652b Compare February 7, 2025 15:38
@datho7561
Copy link
Author

I think some (but not all) of the test cases this fixes were also fixed by b53a413

@datho7561 datho7561 force-pushed the dom-with-javac-improve-extends-completion branch from c4f652b to 105d118 Compare February 7, 2025 18:58
@datho7561
Copy link
Author

I don't know why there less new passes on the server, locally there are 30 for me. Hopefully rerunning will address this.

@datho7561 datho7561 force-pushed the dom-with-javac-improve-extends-completion branch from 105d118 to 7897680 Compare February 7, 2025 20:18
- precalculate extends or implements info
- When there is no prefix, suggest types declared in the same class,
  eg. suggest `MyInterface` in the following snippet

```java
public class MyClass implements | {

}

interface MyInterface {}
```

- Better recovery of bindings for classes with incomplete extends or
  implements sections
  - previously the binding key was always `*`, which caused many that
    relied on the binding key to break

- Use ExtendsOrImplements info filtering in more places

Signed-off-by: David Thompson <[email protected]>
@datho7561 datho7561 force-pushed the dom-with-javac-improve-extends-completion branch from 7897680 to 5965674 Compare February 7, 2025 21:03
@datho7561
Copy link
Author

datho7561 commented Feb 7, 2025

The discrepancy in my results is related to one of these:
- I kept or removed a commit I wasn't supposed to when rebasing against dom-with-javac
- My script I'm using for testing locally wasn't using a new maven repo for each build, and an incorrect artifact was being used as a result.

update: nope it was becayse there wasn't running mvn clean before my test runs

@datho7561
Copy link
Author

🥳 😍 Fixes 12 🥳 😍

@datho7561 datho7561 merged commit d63eda3 into eclipse-jdtls:dom-with-javac Feb 7, 2025
5 of 9 checks passed
@datho7561 datho7561 deleted the dom-with-javac-improve-extends-completion branch February 7, 2025 21:58
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.

1 participant