No quick fix for some missing imports [message #1859439] |
Wed, 07 June 2023 21:50 |
Benoit Coppens Messages: 7 Registered: June 2023 |
Junior Member |
|
|
Hi,
In some cases, Eclipse does not offer the expected missing import as a quick fix.
I noticed the issue with a brand new download of eclipse-jee-2023-03-R-win32-x86_64, without changing any preference/option.
To reproduce the issue:
1) Create a new "Java Project" with the default options
2) Create a new class with the following main method:
package testPackage;
public class MyClass {
public static void main(String[] args) {
ArrayList<String> myList = null;
}
}
3) With this code, I get the option to add the expected import - see screenshot 1:
4) Change the code to:
package testPackage;
public class MyClass {
public static void main(String[] args) {
ArrayList<String> myList = new ArrayList<String>();
}
}
5) Now, the option to add the expected import is not there anymore - see screenshot 2
Is it a known issue? Or a misconfiguration on my side?
Eclipse version with this issue:
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2023-03 (4.27.0)
Build id: 20230309-1520
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.6+10
Java version: 17.0.6
Eclipse version without this issue
Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2021-12 (4.22.0)
Build id: 20211202-1639
OS: Windows 10, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.1+12
Java version: 17.0.1
Thanks,
Benoit
-
Attachment: 1.jpg
(Size: 43.90KB, Downloaded 1780 times) -
Attachment: 2.jpg
(Size: 35.78KB, Downloaded 1855 times)
Benoit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04676 seconds