Skip to content
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

Tabnine doesn't import class on the auto suggestion #173

Open
handhikadj opened this issue Jul 5, 2021 · 14 comments
Open

Tabnine doesn't import class on the auto suggestion #173

handhikadj opened this issue Jul 5, 2021 · 14 comments
Labels
bug Something isn't working

Comments

@handhikadj
Copy link

handhikadj commented Jul 5, 2021

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

@maya-tabnine
Copy link

What IDE do you use?

@handhikadj
Copy link
Author

IntelliJ IDEA 2021.1.3

@maya-tabnine
Copy link

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!

@handhikadj
Copy link
Author

handhikadj commented Jul 14, 2021

which (IntelliJ plugin) version is it?
I'm using the 0.4.3 still doesn't work

@mvarendorff
Copy link

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!

@maya-tabnine
Copy link

maya-tabnine commented Jul 19, 2021

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

@handhikadj
Copy link
Author

handhikadj commented Jul 19, 2021

It works on class instantiation, doesn't work when calling static class
Thank you anyway

@Eransho
Copy link
Contributor

Eransho commented Jul 21, 2021

Hi @handhikadj, which programming language are you using?
Can you provide a code example where it is not working for you?

@Eransho
Copy link
Contributor

Eransho commented Jul 21, 2021

Hi @geisterfurz007, can you provide a code example where the auto import doesn't work for you?

@handhikadj
Copy link
Author

PHP

@mvarendorff
Copy link

Hey @Eransho, I can indeed (on 0.4.4 of the plugin) in C# in Rider:

R09JRPXcec

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!

@Eransho
Copy link
Contributor

Eransho commented Jul 27, 2021

Thanks @geisterfurz007, that helps. It's a bug and we will add it to our backlog

@Eransho Eransho added the bug Something isn't working label Jul 27, 2021
@mvarendorff
Copy link

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):

BBMRjqMz3O

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!

@lujianzhao
Copy link

When will this bug be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants