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

Prevent tab key appending asterisk for import autocompletion #1532

Closed
rnorm opened this issue Jul 17, 2020 · 3 comments · Fixed by eclipse-jdtls/eclipse.jdt.ls#1510
Closed

Comments

@rnorm
Copy link

rnorm commented Jul 17, 2020

I want to import org.springframework.boot.SpringApplication;. When I type import org.spring and then press tab key, the autocompleted code is import org.springframework.*;. I want to have the autocompleted code as import org.springframework so that I can type .bo for further completion. Or is there another way to autocomplete this import statement?

Environment
  • Operating System: macOS 10.15.5
  • JDK version: openjdk 14.0.2
  • Visual Studio Code version: 1.47.2
  • Java extension version: v0.64.1
Steps To Reproduce
  1. type import org.spring
  2. press tab key
Current Result

import org.springframework.*;

Expected Result

import org.springframework

Additional Informations
@fbricon
Copy link
Collaborator

fbricon commented Jul 17, 2020

That's the default behavior of Eclipse JDT. I think our best option, if it's possible to override that behavior, is to return org.springframework.${0:*;} so that you could keep typing, after the 1st tab, to get type imports.
@snjeza WDYT? is this easy to do?

@fbricon
Copy link
Collaborator

fbricon commented Jul 20, 2020

See new behavior:

importcompletion

@rnorm
Copy link
Author

rnorm commented Jul 20, 2020

Thanks for the quick response!

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

Successfully merging a pull request may close this issue.

3 participants