Eclipse 2021-09 code completion not showing all methods and classes
Asked Answered
T

1

15

Hi some days before I updated my eclipse 2021-06 to 2021-09 and after that its code completion will not show all the methods and classes. For example if I type frame.setS, then it is showing no default proposals.

enter image description here

But At the same time when I type frame.setC and press ctrl+space, it is working This is the

enter image description here

Also in my settings everything is checked.

enter image description here

What I have tried

  1. I searched the web and found many stack overflow questions and I tried the answers. But it didn't work

  2. I deleted the .metedata folder and uninstalled and reinstalled eclipse for 5 times.

  3. I tried installing eclipse from installer and zip.

Is this a bug or something.

I have also installed the java 17 plugin from eclipse marketplace.

Edit

In eclipse 2021-12 (4.22) which released yesterday (08-12-21), java.awt.* is not filtered out. So no problem. Also it has Java-17 support..

Tumpline answered 28/9, 2021 at 7:4 Comment(3)
Never ever delete the .metadata folder, that's a hoax spread on Stack Overflow. When you cannot restore it, use a fresh workspace. The Java 17 plugin is a preview/BETA, not the official release. Please provide a minimal reproducible example and make sure it has been reported to Eclipse. In the last to versions bigger changes has been made in the content assist to handle incomplete code, and there are known issues in Eclipse 2021-09 (4.21): see here. – Swash
I cannot reproduce it. Please show a minimal reproducible example that works without the Java 17 plugin. – Swash
@Swash install eclipse 2021-09 and try you can reproduce it. Also I subscribed your youtube channel so that I can see videos about eclipse. – Tumpline
S
24

In Eclipse 2021-09 (4.21) everything of java.awt.* is filtered out in the content assist by default.

To disable this default filter, go to the preferences (Window > Preferences; in macOS in the application menu) Java > Appearance > Type Filters and uncheck the checkbox java.awt.*.

I reported it to Eclipse and it has been fixed within two weeks, so it will be in the next release Eclipse 2021-12 (4.22) that will be released on December 8, 2021 (and also sooner in the milestone builds starting with M2):

Swash answered 29/9, 2021 at 17:47 Comment(4)
Thanks Sir It Worked. You Saved My life. I was going to install NetBeans and you saved eclipse. Thanks sir thanks. I cannot explain my happiness Thank you sir Thank you. Now my Eclipse is working fine. πŸ˜€πŸ˜€πŸ˜€ Sir god bless you. – Tumpline
Thanks. The other default choices here explains why JDK Panama classes vanished from my Eclipse after I also upgraded, as the default filter hides jdk.*. – Musca
Sir now in eclipse 2021-12 everything is okay. – Tumpline
@JFan Great. Not all, but most of the bugs I reported to Eclipse were fixed quickly. And this one was even reported without a patch. I also covered it in my Eclipse Java IDE 2021-12 video: youtu.be/3W9bvidcO20?t=172 – Swash

© 2022 - 2024 β€” McMap. All rights reserved.