-
Notifications
You must be signed in to change notification settings - Fork 430
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
No Autocomplete for Overriden Methods #3186
Comments
@Brahvim I can't reproduce the issue. |
@snjeza, yes, the issue is hard to reproduce. Quite oddly however, it seems to be affecting only some methods in my code. Not all. RedhatVsCodeJavaIssue3186.mp4In the footage, you can see that when I override I then remove the entire method, type just its identifier, press However, I then demonstrate overriding a different method - I hope this is enough proof. This is indeed very unexpected behavior, and I can see how tracking it down is not easy. Thank you for listening to me, though - I wish you have a good time! |
Here are my settings for the extension in the case I myself got something terribly wrong: // #region Java.
"java.inlayHints.parameterNames.enabled": "none",
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "/home/brahvim/java/jdk-17.0.7+7/",
"default": true
}
],
"java.completion.filteredTypes": [
"com.sun.*",
"sun.*",
"jdk.*"
],
"java.jdt.ls.java.home": "/home/brahvim/java/jdk-17.0.7+7",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms128M -Xmx512M",
"java.cleanup.actionsOnSave": [
"qualifyStaticMembers",
"addDeprecated",
"stringConcatToTextBlock",
"instanceofPatternMatch",
"invertEquals",
"tryWithResource",
"addOverride",
"addFinalModifier"
],
"java.codeGeneration.hashCodeEquals.useInstanceof": true,
"java.debug.settings.console": "internalConsole",
"[java]": {
"editor.defaultFormatter": "redhat.java"
},
"java.sources.organizeImports.starThreshold": 999,
"java.sources.organizeImports.staticStarThreshold": 999,
"java.project.sourcePaths": [
"src"
],
"java.project.resourceFilters": [
"node_modules",
"\\.git"
],
"java.jdt.ls.androidSupport.enabled": "on",
"java.import.gradle.home": "",
"java.import.gradle.jvmArguments": "-Xmx256m",
"java.import.gradle.offline.enabled": true,
"java.jdt.ls.protobufSupport.enabled": false,
"java.import.maven.offline.enabled": true,
"java.compile.nullAnalysis.nonnull": [
"javax.annotation.Nonnull",
"org.eclipse.jdt.annotation.NonNull",
"org.springframework.lang.NonNull"
],
"java.compile.nullAnalysis.nullable": [
"javax.annotation.Nullable",
"org.eclipse.jdt.annotation.Nullable",
"org.springframework.lang.Nullable"
],
"java.completion.chain.enabled": true,
"java.completion.enabled": true,
"java.configuration.workspaceCacheLimit": 15,
// #endregion |
I think I'm seeing this behaviour as well, but only in one of my projects :-/ Autocomplete for method overrides is just suggestions of recently typed words. I'm also having trouble with autocomplete adding imports... I am having to add imports using Organize Imports. At least in my case, this is a regression in Language Support for Java(TM) by Red Hat v1.20.0. If I revert to v1.19.0 and clean the Java language workspace, it works fine. If I then upgrade again to v1.20.0 and clean the Java language workspace, it's broken. I see this exception in the Output:
HOWEVER on 1.19.0, the autocomplete still stops working... It is reproducible if I make a new Java file. Autocomplete is not available in that new Java file. There is nothing in the Language Support for Java Output window when this happens. Autocomplete continues to work in other Java files for a bit, but then can also die. |
Did something with respect to suggestions in this extension break recently? I've been seeing multiple questions on Stack Overflow about suggestion issues related to Java in VS Code:
Should I raise a new issue ticket for this? Or is there an existing one covering these issues? |
@starball5 You may want to take a look at #3179 |
fixed by eclipse-jdtls/eclipse.jdt.ls#2902 |
Environment
5.27
, GNU-Linux.JavaSE-17
, specificallyjdk-17.0.7+7
.1.79.2
and1.80.0
.1.20.0
.Steps To Reproduce
src
folder, perhaps in a package,Current Result
The autocompleion list simply shows unrelated fuzzy-matched symbols.
For example,
double
, for a method nameddraw()
, or somesun
-related packages forsetup()
.Expected Result
Pressing
Tab
should autocomplete the method signature, place curly braces, annotate the method with@Override
, et cetera.Additional Information
Apparently this affects only some methods declared as
protected
in the super-class.This also applies to anonymous and inner classes.
I've written about this issue on stackoverflow as well.
The text was updated successfully, but these errors were encountered: