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
difficult to know which item to select in the code completion menu #3415
Comments
@lambdabaa has done some work here I think you're seeing a difference between 2018.3 and 2019.1 - the newer version supports a feature to show completions for symbols that aren't in scope. This does mean that there are a lot more symbols to show. In the case where you're not typing @lambdabaa, I believe that a not-yet-in-stable iteration will show additional details in the code completion view? |
Thanks for raising this issue! We do have a couple of changes in the works to improve this situation. The first one was JetBrains/intellij-plugins#650 which makes it so that we always show the exporting library even if there are parameters (for example, in the case of a constructor). I will check to see which 2019.1 Dart plugin versions, if any, includes this change. A second improvement was made in analysis server last week https://dart-review.googlesource.com/c/sdk/+/103561 to tell the IntelliJ plugin
I am working on a Dart IntelliJ plugin patch this week to use those bits so that, if a library that exports a token is already imported, we will filter not-yet-imported completion suggestions for that token. We don't have a plan yet for the more general option to prevent duplicate suggestions altogether, but perhaps this could be implemented as an opt-in Dart IntelliJ preference. Wdyt @scheglov @alexander-doroshko? |
Regarding the first problem "The same class appears 3 times because there are 3 ways to import it".
Regarding the second problem: "Both class and constructor are suggested". Such two items look very similar and effectively the difference is only in parentheses insertion. Again, I'm not a pro Dart dev, but I'd be happy if the server could decide which suggestion is better and give only one of those. In any case, I'd be happy not to add any options to the IDE UI. |
|
Isn't it purely a server-side change? What changes does it require on the IDE end? |
It does require changes on the IDE side, because it is suggestion by suggestion decision. For example Now, if the target library So, the client should use |
@scheglov @alexander-doroshko So I have a patch open to leverage the The client preference would say "never suggest the duplicate names / displayUris" or similar. Wdyt? |
I don't think we need such preference. When there is a choice, it is up to the user to make it - DAS does not know whether to choose When the user has already made his choice by importing |
When possible we prefer not to add any options to the UI. |
/fyi @bwilkerson @jwren |
Hello, i have been a long while today trying to solve this. I'd be very happy if someone tell us how :) The only way i found to solve this is using live templates, but that is not a general solution, it solves the problem, but with pretty much work. The second and also not perfect solution i found is: If you activate Sort by Name, the desired one (constructor class, the one with |
FWIW, here is the result of fuzzy matching score and relevances. It looks that the relevance for
|
@scheglov I have made a new issue summarizing the information that is scattered in several related threads. Read it if you can and your comments are more than wellcome. |
When creating new widget and typing the new keyword before it for e.x. new Conta and clicking tab I do get the full completion for that widget (new Container()). When I don't use the new keyword and try to tab for autocomplete a just get the widget name like so Container
i updated to 2019.1.1
i get 3 of everything when i press tab for auto just get name like so Text or Container
at version 2018.3.6 i get 2 item
when i try to press enter or tab at (MaterialApp ( package...)) auto complet just get (MaterialApp)
but when i press tab at MaterialApp ({Ke.... auto is work fine
i dont need to use new or getting 2-3 item how to fix this? i just want this
Version info
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.16299.15], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[√] IntelliJ IDEA Community Edition (version 2019.1)
[√] VS Code (version 1.33.1)
[!] Connected device
! No devices available
Plugin: dart and flutter
The text was updated successfully, but these errors were encountered: