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

Update types filter according to import declarations #2474

Merged
merged 5 commits into from
Feb 22, 2023

Conversation

jdneo
Copy link
Contributor

@jdneo jdneo commented Feb 17, 2023

The idea comes from #2467 (comment).

This change has several benefits:

  1. Quick fixes for unresolved types will also contain the types that are already imported.
  2. If the package/type is used in one compilation unit, it is a hint that the package/type is used in other compilation units as well.

fix redhat-developer/vscode-java#2943

- Update the types filter directly according to the import declarations.
  This change has several benefits:
  1. Quick fixes for unresolved types will also contain the types that are
     already imported.
  2. If the package/type is used in one compilation unit, it is a hint
     that the package/type is used in other compilation units as well.

Signed-off-by: Sheng Chen <sheche@microsoft.com>
Signed-off-by: Sheng Chen <sheche@microsoft.com>
@jdneo
Copy link
Contributor Author

jdneo commented Feb 17, 2023

test this please

@jdneo jdneo marked this pull request as ready for review February 17, 2023 09:05
@jdneo jdneo changed the title [WIP] Update types filter according to import declarations Update types filter according to import declarations Feb 17, 2023
@rgrunber rgrunber added this to the Mid March 2023 milestone Feb 17, 2023
Signed-off-by: Sheng Chen <sheche@microsoft.com>
Signed-off-by: Sheng Chen <sheche@microsoft.com>
Signed-off-by: Sheng Chen <sheche@microsoft.com>
@jdneo
Copy link
Contributor Author

jdneo commented Feb 22, 2023

Profiled the impact of the added method on completion, the result shows that the impact is limited.

image

@jdneo jdneo merged commit 7a62d82 into eclipse-jdtls:master Feb 22, 2023
@jdneo jdneo deleted the cs/type-filter-enhancement branch February 22, 2023 07:27
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.

Intellisense shows improperly for "import java.awt."
5 participants