-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Missing import suggestions #30295
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
Comments
@JFixby, your screenshot shows code completion popup. Code completion suggests items that may appear at the caret position. Import statement can't appear after You'll get a suggestion to add import if you invoke quick fix on red code (Alt+Enter): It would be great if code completion helped to write class names from files that are not imported yet and auto-imserted required import statements. Since code completion is powered by the Analysis Server this issue is tracked at SDK end, see #25820 and #21931. As for this issue, I think it can be closed. |
Please treat it as a feature request and re-open. |
Thanks for the example! This is pretty much similar to what is asked in #25820 and #21931. Ok, I'm reopening and moving to area-analyzer. Let @bwilkerson take another look. |
Reproduction steps:
Example project: https://github.com/JFixby/DartImportsExample
class A located in the
lib/folderA/class_a_file.dart
content:
class C located in the
lib/class_c_depends_on_a.dart
depends on the Acontent:
What was done
print
A.
in the constructor of the classC
What is expected
to see a list of suggested imports with proposal to import
lib/folderA/class_a_file.dart
What is actually happening
no relevant suggestions
Setup
IDEA version: community 2017.2
Dart plugin: 172.3317.48
The text was updated successfully, but these errors were encountered: