tabnine-intellij
tabnine-intellij copied to clipboard
Tabnine doesn't import class on the auto suggestion
It somewhat bothers me when I select one of the result of Tabnine's auto suggestion and the related class is not imported
gz#2930
What IDE do you use?
IntelliJ IDEA 2021.1.3
We recently added an improved auto-import completions, make sure you are on the latest version of Tabnine and check it out. If you still have an issue, let us know and we will check!
which (IntelliJ plugin) version is it? I'm using the 0.4.3 still doesn't work
I am using the plugin (0.4.3) in Rider and also have to manually import classes in suggestions. If there is any way I can help debug the issue, please let me know!
We just launched a new plugin version 0.4.4, that contains fixes for the auto-import issues. Please update your plugin, check and let me know it works for you! @geisterfurz007 @handhikadj
It works on class instantiation, doesn't work when calling static class Thank you anyway
Hi @handhikadj, which programming language are you using? Can you provide a code example where it is not working for you?
Hi @geisterfurz007, can you provide a code example where the auto import doesn't work for you?
PHP
Hey @Eransho, I can indeed (on 0.4.4 of the plugin) in C# in Rider:
As you can see, Tabnine suggests HttpClient which I select but the import isn't created. Only when I manually press Alt + Enter towards the end of the video, System.Http
is imported. HttpClient is immediately imported without a popup box so it's not an ambiguous import (where I can understand that TabNine might not auto import because of multiple options).
namespace TabNineDemo {
public class Demo {
public Ht/* accept TabNine suggestion */
}
}
Expected:
using System.Net.Http;
namespace TabNineDemo {
public class Demo {
public HttpClient
}
}
Actual:
namespace TabNineDemo {
public class Demo {
public HttpClient
}
}
I hope this helps, if you need anything else, let me know!
For some good news: Auto imports work quite nicely in a React (TS) project in WebStorm which feels really good!
Thanks @geisterfurz007, that helps. It's a bug and we will add it to our backlog
Awesome, thanks!
I don't know if this is a similar or the same case, but while I was fiddling around with Flutter, I also found this case (Android Studio Arctic Fox 2020.3.1, TabNine 0.4.4, Dart 2.13.3):
I accept two completions from TabNine in the gif shared: SortFilter.of(context)
which does not automatically import the SortFilter class and then a second one SortFilter.
in which case the import works (visible by the shift in lines). If that is a different issue, I will be happy to open another GitHub issue for easier organisation. And if there is anything I can do to help debug or fix this, I would be more than happy to look into it!
When will this bug be fixed?