Problems with Class Name Complete/Auto-import

Not sure when this problem started, sometime during 7.0.4 EAP's for
sure, but it's annoying me enough now to take time to post something
about it... Class Name Complete and Auto-Import functionality has broken
for selected library classes.

I've seen it with other libs but at the moment I'm seeing it with the
Jetbrains annotations. E.g. If I add @Nullable, then Nullable is red
and I don't see any auto popup to import it. If I put my cursor at the
end of the Nullable and invoke Class Name Completion I get no popup.
The only thing I can do is manually put in the import statement myself.

Note that code completion works fine when I am typing the import
statement; if I've got 'import org.jetbrains.annotations.' and I invoke
completion I get the list of annotations in the popup. The resulting
import statement has no errors either.

Only error in the log is the one below, which I have already submitted
via error reporter... I don't know if it has anything to do with it.
With no plugins installed I still get the same thing.

Can anyone help?

Cheers,
N.


Element: class com.intellij.psi.impl.compiled.ClsClassImpl
com.intellij.psi.PsiInvalidElementAccessException: Element: class
com.intellij.psi.impl.compiled.ClsClassImpl
at
com.intellij.psi.impl.compiled.ClsClassImpl.getContainingFile(ClsClassImpl.java:572)
at
com.intellij.psi.impl.PsiShortNamesCacheImpl.getClassesByName(PsiShortNamesCacheImpl.java:81)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:198)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentionsPass.java:119)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doApplyInformationToEditor(ShowIntentionsPass.java:158)
at
com.intellij.codeHighlighting.TextEditorHighlightingPass.applyInformationToEditor(TextEditorHighlightingPass.java:65)
at
com.intellij.codeInsight.daemon.impl.PassExecutorService$3.run(PassExecutorService.java:2)
at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:9)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:179)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:37)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:119)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

2 comments
Comment actions Permalink

Hello Nathan,

This problem should be fixed if you delete the caches.

Not sure when this problem started, sometime during 7.0.4 EAP's for
sure, but it's annoying me enough now to take time to post something
about it... Class Name Complete and Auto-Import functionality has
broken for selected library classes.

I've seen it with other libs but at the moment I'm seeing it with the
Jetbrains annotations. E.g. If I add @Nullable, then Nullable is red
and I don't see any auto popup to import it. If I put my cursor at
the end of the Nullable and invoke Class Name Completion I get no
popup. The only thing I can do is manually put in the import statement
myself.

Note that code completion works fine when I am typing the import
statement; if I've got 'import org.jetbrains.annotations.' and I
invoke completion I get the list of annotations in the popup. The
resulting import statement has no errors either.

Only error in the log is the one below, which I have already submitted
via error reporter... I don't know if it has anything to do with it.
With no plugins installed I still get the same thing.

Can anyone help?

Cheers,
N.
Element: class com.intellij.psi.impl.compiled.ClsClassImpl
com.intellij.psi.PsiInvalidElementAccessException: Element: class
com.intellij.psi.impl.compiled.ClsClassImpl
at
com.intellij.psi.impl.compiled.ClsClassImpl.getContainingFile(ClsClass
Impl.java:572)
at
com.intellij.psi.impl.PsiShortNamesCacheImpl.getClassesByName(PsiShort
NamesCacheImpl.java:81)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentio
nsPass.java:198)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.a(ShowIntentio
nsPass.java:119)
at
com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doApplyInforma
tionToEditor(ShowIntentionsPass.java:158)
at
com.intellij.codeHighlighting.TextEditorHighlightingPass.applyInformat
ionToEditor(TextEditorHighlightingPass.java:65)
at
com.intellij.codeInsight.daemon.impl.PassExecutorService$3.run(PassExe
cutorService.java:2)
at
com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(La
terInvocator.java:9)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:179)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:37)
at
com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:119)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
d.java:273)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava:183)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
d.java:173)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Dmitry Jemerov wrote:

Hello Nathan,

This problem should be fixed if you delete the caches.

Thanks Dmitry, that worked. I'm sure I did that before but it didn't do
anything - it's usually the first thing I try.

Cheers,
N.

0

Please sign in to leave a comment.