-
Notifications
You must be signed in to change notification settings - Fork 453
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 error for missing import #1266
Comments
Most likely it's because I was using a stand-alone file, and so had an "incomplete classpath", isn't it? If so, you can close this issue. |
@anthonyvdotbe When you open an external Java (aka stand-alone) file in VS Code, we only show syntax errors. The quickfix for missing import won't be enabled. If you want to import all missing types quickly, you can use the global Organize imports command (Shift + Alt + O) for that. |
@testforstephen Thanks for the tip. While I know about the command, because there are no visual clues that doing Organize imports might help, I simply don't think of doing it. I filed #1270 as a follow-up issue to improve support for standalone files. |
As a follow-up to #1265: sometimes there's no error reported for a missing import
Environment
Steps To Reproduce
Copy-paste the code below in a Java file. Note that there's no error reported for the missing import of
java.util.List
Current Result
Expected Result
An error is reported on the usage of
List.of
The text was updated successfully, but these errors were encountered: