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

Autocompletion does not work with enum ctors #454

Closed
personinblack opened this issue Feb 28, 2018 · 6 comments
Closed

Autocompletion does not work with enum ctors #454

personinblack opened this issue Feb 28, 2018 · 6 comments

Comments

@personinblack
Copy link

The title explains it all. You can't use intellisense in enums' ctors:

public enum ExampleEnum {
    ValueOne("You can't use intellisense in here") // <------
    ;

    ExampleEnum(String string) {
    }
}
Environment
  • Operating System: Arch Linux
  • JDK version: 1.8.0_162
  • Visual Studio Code version: 1.20.1
  • Java extension version: 0.20.0
Steps To Reproduce
  1. Create an enum
  2. Try typing a few words and pressing ctrl + space to bring intellisense
Current Result

You don't get any autocompletion

Expected Result

Intellisense should work normally

@fbricon
Copy link
Collaborator

fbricon commented Feb 28, 2018

What sort of completion are you expecting? a default string value? from a constant in the imports?

@personinblack
Copy link
Author

It's not about strings. String was to show it. It could be something like this:

public enum ExampleEnum {
    ValueOne(Parameter.) // Typing `Parameter.` and trying to autocomplete the method / variable will not work.
    ;

    ExampleEnum(Parameter parameter) {
    }
}

@fbricon
Copy link
Collaborator

fbricon commented Mar 12, 2018

I can reproduce the same problem with stock Eclipse. Opened upstream issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=532366

@neel-suthar
Copy link

Yup!! Having the same issue. So anybody working on it ??

@fbricon
Copy link
Collaborator

fbricon commented Apr 23, 2021

It was fixed upstream today: https://bugs.eclipse.org/bugs/show_bug.cgi?id=532366#c16

It might take a few weeks before we can consume those bits.

@0dinD
Copy link
Contributor

0dinD commented Jun 24, 2021

Looks like the fix has finally made it into eclipse.jdt.ls with the recent updates to the target platform! I can no longer reproduce the bug after trying eclipse-jdtls/eclipse.jdt.ls@5483c3a, so I think this issue can be closed now.

@snjeza snjeza closed this as completed Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants