ide-java icon indicating copy to clipboard operation
ide-java copied to clipboard

Error performing autoimport: Unknown autocomplete suggestion type mixin

Open samu opened this issue 6 years ago • 6 comments

When i try to use the "add import for" feature, i get the following error:

Error performing autoimport: Unknown autocomplete suggestion type mixin

samu avatar Sep 13 '19 12:09 samu

It looks like this is due to the absence of a .classpath file in my project folder.

I tried to open the same project with vs code and the java extension - then, .classpath was generated automatically. Now, the "add import for" feature works in atom.

I wonder what exactly the vs code extension is doing differently. Any advice?

samu avatar Sep 18 '19 11:09 samu

Am having the same issue. Just thought I'd add my voice since this has been open for three months without comment.

MarceloLaser avatar Dec 09 '19 22:12 MarceloLaser

I ran into this today trying to auto-import a Spring annotation. It turns out atom-languageclient considers annotations to be of type mixin, which is a case not handled by autoImportActionProvider.js#buildImportSuggestion. I will open a PR containing a fix shortly.

mdiin avatar Feb 18 '20 20:02 mdiin

Hello @mdiin, I've seen your fix (#120) for this issue. I was with a similar problem that seems to me is possible to solve the same way.

Trying to use the "add import for..." feature on an enum, the following error rises:

error performing autoimport: unknown autocomplete suggestion type enum

Adding case 'enum': the same way you did with case 'mixin': seems to solve the problem as well. If that is the proper way to solve this problem, can you include this one more line to your fix or is it better to create another issue/pull request for this?

Thanks.

m-lnrs avatar Apr 30 '20 01:04 m-lnrs

Hi @m-lib,

I think you should create another PR for that fix, since it is orthogonal to the fix in #120.

Sorry for the late reply.

mdiin avatar May 19 '20 11:05 mdiin

Thank you very much @mdiin :-D

I've been using your solution in a while for now. It's working like a charm!

Thanks.

m-lnrs avatar Sep 04 '20 03:09 m-lnrs