20181203 有新的发现,这个qaplug总和了checkstyle,findbugs,pmd,hammurapi,我之前都是5个全装,今天经过测试发现不装qaplug-findbugs就正常,好像就findbugs组件出了问题
as已经发展到3.2.1了,以前在2.2用过qaplug去检测分析代码
现在公司有需求,让我再看一下,好的话公司里推广
然后就发现as3.0以上的,新建的项目可以用qaplug,现有的项目都不行
我把现有项目的gradle降级到2.3.3,然后用as233去加载现有项目,然后用qaplug就可以了
as3.0+一般会报一个PsiIdentifierImpl的错误,使用qaplug后,那个result窗口不会弹出来
而是弹messages窗口,然后在as右下角有一个红底白色感叹号,点一下会有个ide fatal error
as3.1.2具体报错信息如下:
Element: class com.intellij.psi.impl.source.tree.java.PsiIdentifierImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=file://D:/Program1/as312/NBMbank/PullToRefreshLib/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java, content=VirtualFileContent{size=45401}}(36f1dbe4); SingleRootFileViewProvider{myVirtualFile=file://D:/Program1/as312/NBMbank/PullToRefreshLib/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java, content=VirtualFileContent{size=45401}}(63f3085a)
invalidated at: see attachment; com.intellij.psi.impl.source.tree.java.PsiIdentifierImpl:IDENTIFIER / com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl:REFERENCE_EXPRESSION / com.intellij.psi.impl.source.tree.java.PsiAssignmentExpressionImpl:ASSIGNMENT_EXPRESSION / com.intellij.psi.impl.source.tree.java.PsiExpressionStatementImpl:EXPRESSION_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiSwitchStatementImpl:SWITCH_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiBlockStatementImpl:BLOCK_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiIfStatementImpl:IF_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiBlockStatementImpl:BLOCK_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiSwitchStatementImpl:SWITCH_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.MethodElement:METHOD / com.intellij.psi.impl.source.tree.java.ClassElement:CLASS / com.intellij.psi.impl.source.tree.java.JavaFileElement:java.FILE
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.tree.java.PsiIdentifierImpl because: different providers: SingleRootFileViewProvider{myVirtualFile=file://D:/Program1/as312/NBMbank/PullToRefreshLib/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java, content=VirtualFileContent{size=45401}}(36f1dbe4); SingleRootFileViewProvider{myVirtualFile=file://D:/Program1/as312/NBMbank/PullToRefreshLib/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshBase.java, content=VirtualFileContent{size=45401}}(63f3085a)
invalidated at: see attachment; com.intellij.psi.impl.source.tree.java.PsiIdentifierImpl:IDENTIFIER / com.intellij.psi.impl.source.tree.java.PsiReferenceExpressionImpl:REFERENCE_EXPRESSION / com.intellij.psi.impl.source.tree.java.PsiAssignmentExpressionImpl:ASSIGNMENT_EXPRESSION / com.intellij.psi.impl.source.tree.java.PsiExpressionStatementImpl:EXPRESSION_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiSwitchStatementImpl:SWITCH_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiBlockStatementImpl:BLOCK_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiIfStatementImpl:IF_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiBlockStatementImpl:BLOCK_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.PsiSwitchStatementImpl:SWITCH_STATEMENT / com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl:CODE_BLOCK / com.intellij.psi.impl.source.tree.java.MethodElement:METHOD / com.intellij.psi.impl.source.tree.java.ClassElement:CLASS / com.intellij.psi.impl.source.tree.java.JavaFileElement:java.FILE
at com.intellij.psi.impl.source.tree.LeafPsiElement.invalid(LeafPsiElement.java:109)
at com.intellij.psi.impl.source.tree.LeafPsiElement.getContainingFile(LeafPsiElement.java:93)
at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:57)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:94)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:159)
at com.soldevelo.findbugs.FindBugsChecker$2.run(FindBugsChecker.java:223)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:912)
at com.soldevelo.findbugs.FindBugsChecker.run(FindBugsChecker.java:189)
at com.soldevelo.findbugs.FindBugsManagerImpl.performAnalysis(FindBugsManagerImpl.java:66)
at com.soldevelo.qaplug.scanner.ScanningTask.run(ScanningTask.java:107)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
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)