Refresh auto-import popup

Hi all,

In my plugin I support auto-importing from my annotator using the ImportClassFix. This works fine, and it also works in my language console, where I automatically execute an import command in the REPL session in my PsiReference#bindToElement method. However in the console the popup does not disappear until I edit something in the editor, presumably because it's cached the resolve result somewhere and hasn't been updated with the fact that the symbol now resolves correctly. I can't figure out how to fix this - any suggestions?

Cheers,
Colin

2 comments
Comment actions Permalink

*bump* Any ideas for this?

0
Comment actions Permalink

In case anyone is interested, I managed to fix this by calling PsiManager.dropResolveCaches() followed by DaemonCodeAnalyzer.restart(file) after doing the import in the console. This mostly works, after importing the highlighting is run again and the symbol is no longer highlighted or suggested for import, however the import quickfix lightbulb still pops up if I don't move the cursor after doing this. As soon as I move the cursor it disappears. Any ideas how I can stop the lightbulb appearing?

Thanks,
Colin

0

Please sign in to leave a comment.