Quantcast
Channel: 簡睿隨筆
Viewing all articles
Browse latest Browse all 897

IntelliJ IDEA 2016.2.1 的JSP Code Complete有問題

$
0
0

最近把IntelliJ IDEA升級到2016.2.1後,在JSP裡的code complete就有問題,在物件變數後按 . 應該要出現能使用的多個methods,卻只出現一個,查了C:\Users\使用者.IntelliJIdea2016.2\system\log\idea.log後發現有Exception:

2016-08-15 22:04:56,351 [ 302048]  ERROR - on.CompletionProgressIndicator - com.intellij.psi.impl.source.jsp.JspJavaFileImpl cannot be cast to com.intellij.psi.jsp.JspFile 
java.lang.ClassCastException: com.intellij.psi.impl.source.jsp.JspJavaFileImpl cannot be cast to com.intellij.psi.jsp.JspFile
    at com.intellij.psi.impl.source.jsp.JspContextManagerImpl.processContextElements(JspContextManagerImpl.java:209)
    at com.intellij.psi.impl.source.jsp.JspJavaFileImpl.processDeclarations(JspJavaFileImpl.java:49)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:68)
    at com.intellij.psi.scope.util.PsiScopesUtil.treeWalkUp(PsiScopesUtil.java:50)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:226)
    at com.intellij.psi.scope.util.PsiScopesUtil.resolveAndWalk(PsiScopesUtil.java:157)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.a(PsiJavaCodeReferenceElementImpl.java:448)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.access$100(PsiJavaCodeReferenceElementImpl.java:55)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:350)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl$OurGenericsResolver.resolve(PsiJavaCodeReferenceElementImpl.java:342)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:191)
    at com.intellij.psi.impl.source.resolve.ResolveCache$4.compute(ResolveCache.java:188)
    at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:188)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:752)
    at com.intellij.psi.impl.PsiImplUtil.multiResolveImpl(PsiImplUtil.java:741)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.multiResolve(PsiJavaCodeReferenceElementImpl.java:377)
    at com.intellij.psi.impl.source.PsiJavaCodeReferenceElementImpl.advancedResolve(PsiJavaCodeReferenceElementImpl.java:370)
    at com.intellij.psi.impl.source.PsiClassReferenceType.resolveGenerics(PsiClassReferenceType.java:145)
    at com.intellij.psi.util.PsiUtil.captureToplevelWildcards(PsiUtil.java:784)
    at com.intellij.psi.impl.PsiImplUtil.normalizeWildcardTypeByPosition(PsiImplUtil.java:384)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$TypeEvaluator.fun(PsiReferenceExpressionImpl.java:416)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl$TypeEvaluator.fun(PsiReferenceExpressionImpl.java:361)
    at com.intellij.psi.impl.source.resolve.JavaResolveCache.getType(JavaResolveCache.java:87)
    at com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl.getType(PsiReferenceExpressionImpl.java:428)
    at com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils.c(JavaPostfixTemplatesUtils.java:153)
    at com.intellij.openapi.util.Conditions$And.value(Conditions.java:179)
    at com.intellij.openapi.util.Conditions$And.value(Conditions.java:179)
    at com.intellij.util.containers.ContainerUtil.findAll(ContainerUtil.java:1029)
    at com.intellij.util.containers.ContainerUtil.filter(ContainerUtil.java:1008)
    at com.intellij.codeInsight.template.postfix.templates.PostfixTemplateExpressionSelectorBase.getExpressions(PostfixTemplateExpressionSelectorBase.java:60)
    at com.intellij.codeInsight.template.postfix.templates.PostfixTemplateExpressionSelectorBase.hasExpression(PostfixTemplateExpressionSelectorBase.java:50)
    at com.intellij.codeInsight.template.postfix.templates.PostfixTemplateWithExpressionSelector.isApplicable(PostfixTemplateWithExpressionSelector.java:54)
    at com.intellij.codeInsight.template.postfix.templates.PostfixLiveTemplate.a(PostfixLiveTemplate.java:266)
    at com.intellij.codeInsight.template.postfix.templates.PostfixLiveTemplate.getLookupElements(PostfixLiveTemplate.java:211)
    at com.intellij.codeInsight.template.CustomLiveTemplateBase.addCompletions(CustomLiveTemplateBase.java:53)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor.a(LiveTemplateCompletionContributor.java:153)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor.access$100(LiveTemplateCompletionContributor.java:50)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.a(LiveTemplateCompletionContributor.java:93)
    at com.intellij.codeInsight.completion.CompletionResultSet.passResult(CompletionResultSet.java:69)
    at com.intellij.codeInsight.completion.JavaNoVariantsDelegator$ResultTracker.consume(JavaNoVariantsDelegator.java:206)
    at com.intellij.codeInsight.completion.JavaNoVariantsDelegator$1.consume(JavaNoVariantsDelegator.java:49)
    at com.intellij.codeInsight.completion.JavaNoVariantsDelegator$1.consume(JavaNoVariantsDelegator.java:46)
    at com.intellij.codeInsight.completion.CompletionResultSet.passResult(CompletionResultSet.java:69)
    at com.intellij.codeInsight.completion.impl.CompletionServiceImpl$CompletionResultSetImpl.addElement(CompletionServiceImpl.java:135)
    at com.intellij.codeInsight.completion.JavaCompletionContributor.a(JavaCompletionContributor.java:412)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.a(LegacyCompletionContributor.java:124)
    at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReferences(LegacyCompletionContributor.java:107)
    at com.intellij.codeInsight.completion.JavaCompletionContributor.b(JavaCompletionContributor.java:366)
    at com.intellij.codeInsight.completion.JavaCompletionContributor.fillCompletionVariants(JavaCompletionContributor.java:234)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:132)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:125)
    at com.intellij.codeInsight.completion.JavaNoVariantsDelegator.fillCompletionVariants(JavaNoVariantsDelegator.java:61)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:132)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:125)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:110)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:776)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.access$500(CompletionProgressIndicator.java:90)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:758)
    at com.intellij.codeInsight.completion.AsyncCompletion.b(CompletionThreading.java:87)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:856)
    at com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:84)
    at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
    at com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:82)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2016-08-15 22:04:56,351 [ 302048]  ERROR - on.CompletionProgressIndicator - IntelliJ IDEA 2016.2.1  Build #IU-162.1447.26 

最後重新安裝2016.2.2的EAP版就正常了。

##


您可能也會有興趣的類似文章


Viewing all articles
Browse latest Browse all 897

Trending Articles