No Code Coverage on Line-Level

Issue #336 resolved
Torsten Rost created an issue

We (all Team Members in our project) get no code coverage data displayed on a code line level. We get it on class-level (as shown in the screenshots).

When we use the Developer console get it dispayed. (see screen shot)

We have the same behaviorr with IntelliJ 2016 ans IntelliJ 15.

Comments (30)

  1. Scott Wells repo owner

    I've definitely found (at least) two bugs here. I'll get a fix out in the next day or two. Thanks for bringing it to my attention!

  2. Scott Wells repo owner

    Here's a test build with the prospective fix. Do you mind installing it using Settings>Plugins>Install Plugin from Disk and then trying to show coverage to see if it resolves the issue? If it doesn't, please restart the IDE and perform the same operation with the following classes enabled for debug logging:

    #com.illuminatedcloud.intellij.coverage.ApexCoverageEngine
    #com.illuminatedcloud.intellij.coverage.ApexCoverageSuite
    

    You can configure that using Help>Debug Log Settings. Once you try to show code coverage with those settings, please send me the resulting idea.log (Help>Show Log in Explorer/Finder) and I'll see what there is to see.

  3. Torsten Rost reporter

    Hi Scott, the fix doesn't work. Attached you can find the log. I replaced the Class-Names with xxx. They looked correct before I did that.

  4. Torsten Rost reporter

    Sorry, the fix works! Now I see the coverage lines. I do not no, why I couldn't see it 2 hours before. It's Monday Morning ;-)

  5. Scott Wells repo owner

    Okay, so it does seem to resolve the issue for you? If so, I'll get an official release out today or tomorrow (perhaps bundled with a few other small fixes).

  6. Torsten Rost reporter

    Hi Scott, after it worked for some hours ... now ... again, the same problem. The lines are not marked as (not)covered. The log is like the attached one. :-(

  7. Scott Wells repo owner

    Okay. I was worried when you said it didn't work and then worked this morning. I'll look at the log you supplied and see what else might be going on before releasing the fix.

  8. Torsten Rost reporter

    Hi Scott, now I now what happend ;-) ... The fix works fine for Triggers! I can see code coverage on triggers now. For classes it does not work. As I checked your fix I only check it with class files (that's why I wrote "does not work). Than I had something to do on some triggers ... and I saw the covergae information ... so I wrote 'It works'. Than I was back on some classes and missed the cioverage information again ... sorry.

    Finaly: With Triggers everything is fine now. For classes not.

  9. Scott Wells repo owner

    You've understandably removed the exact class/trigger names from the log file. However, there's some useful information in there. I don't need you to send it to me, but I do need for you to verify something if you don't mind. For each class that has a section in the log file like:

    2016-06-27 08:34:38,978 [ 195752]  DEBUG - lij.coverage.ApexCoverageSuite - Processing coverage information for SomeClassName
    2016-06-27 08:34:38,978 [ 195752]  DEBUG - lij.coverage.ApexCoverageSuite -   Lines covered = XX; lines uncovered = YY 
    2016-06-27 08:34:38,978 [ 195752]  DEBUG - lij.coverage.ApexCoverageSuite -   Covered lines = { ... } 
    2016-06-27 08:34:38,978 [ 195752]  DEBUG - lij.coverage.ApexCoverageSuite -   Uncovered lines = { ... } 
    

    upon opening the SomeClassName.cls, there should be a section in the log like:

    2016-06-27 08:34:39,462 [ 196236]  DEBUG - ij.coverage.ApexCoverageEngine - Processing line data for SomeClassName.
    2016-06-27 08:34:39,462 [ 196236]  DEBUG - ij.coverage.ApexCoverageEngine -   Processing as an Apex class file. 
    2016-06-27 08:34:39,462 [ 196236]  DEBUG - ij.coverage.ApexCoverageEngine -   Added qualified name for type declaration SomeClassName.
    2016-06-27 08:34:39,462 [ 196236]  DEBUG - ij.coverage.ApexCoverageEngine -   Returning the following qualified names: { SomeClassName }.
    2016-06-27 08:34:39,462 [ 196236]  DEBUG - ij.coverage.ApexCoverageEngine - The qualified name for SomeClassName is not a library class.
    

    The reason this is important is because the names passed to IntelliJ IDEA's code coverage framework initially (the first logged section) must match the qualified names returned in the second section for the coverage data to be displayed properly when that file is shown. If those don't match, it would explain why you're not seeing coverage markers.

    Please let me know if these seem to match up for you. I would look at the entries for ones that do work, i.e., the triggers, and then look at the ones for some that don't work. See if there are any notable differences. Please let me know what you find!

  10. Torsten Rost reporter

    Hi Scott,

    I extracted the logs you requested for one class:

    ...

    2016-06-29 14:53:54,679 [  88535]  DEBUG - lij.coverage.ApexCoverageSuite - Processing coverage information for EncryptionUtils 
    2016-06-29 14:53:54,679 [  88535]  DEBUG - lij.coverage.ApexCoverageSuite -   Lines covered = 25; lines uncovered = 0 
    2016-06-29 14:53:54,679 [  88535]  DEBUG - lij.coverage.ApexCoverageSuite -   Covered lines = { 7, 9, 20, 21, 22, 25, 28, 30, 31, 32, 34, 35, 36, 40, 41, 42, 43, 44, 45, 47, 48, 50, 54, 59, 60 } 
    ...
    2016-06-29 14:53:54,913 [  88769]  DEBUG - lij.coverage.ApexCoverageSuite - Processing line data for EncryptionUtils 
    2016-06-29 14:53:54,913 [  88769]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting or creating class data 
    2016-06-29 14:53:54,913 [  88769]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting the line count 
    2016-06-29 14:53:54,913 [  88769]  DEBUG - lij.coverage.ApexCoverageSuite -   Line count = 0 
    ...
    2016-06-29 14:53:54,928 [  88784]  DEBUG - ij.coverage.ApexCoverageEngine - Getting qualified names for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls. 
    2016-06-29 14:53:54,928 [  88784]  DEBUG - ij.coverage.ApexCoverageEngine -   Processing as an Apex class file. 
    2016-06-29 14:53:54,928 [  88784]  DEBUG - ij.coverage.ApexCoverageEngine -   Added qualified name for type declaration EncryptionUtils. 
    2016-06-29 14:53:54,928 [  88784]  DEBUG - ij.coverage.ApexCoverageEngine -   Returning the following qualified names: { EncryptionUtils }. 
    2016-06-29 14:53:54,928 [  88784]  DEBUG - ij.coverage.ApexCoverageEngine - C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls is not a library class. 
    2016-06-29 14:53:54,944 [  88800]  DEBUG - ij.coverage.ApexCoverageEngine - Getting qualified names for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls. 
    2016-06-29 14:53:54,944 [  88800]  DEBUG - ij.coverage.ApexCoverageEngine -   Processing as an Apex class file. 
    2016-06-29 14:53:54,944 [  88800]  DEBUG - ij.coverage.ApexCoverageEngine -   Added qualified name for type declaration EncryptionUtils. 
    2016-06-29 14:53:54,944 [  88800]  DEBUG - ij.coverage.ApexCoverageEngine -   Returning the following qualified names: { EncryptionUtils }. 
    2016-06-29 14:53:54,944 [  88800]  DEBUG - ij.coverage.ApexCoverageEngine - The qualified name for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls is EncryptionUtils.
    

    ...

    The second part is strange ... Line count = 0.

    Kind regards, Torsten

  11. Scott Wells repo owner

    I'm finally getting a chance to look at this again. I agree that whatever is going on seems to be related to "Line count = 0". I'm going to add some debug logging to the logic that retrieves the line count for the file with information about each decision that could lead to a result of 0. I'll attach a test build with that debug logging here. If you don't mind running the same test (or one that fails similarly) so I can get more info, I'd appreciate it.

  12. Torsten Rost reporter

    I installed the ZIP attached, but got no more information in the logs:

    ...

    2016-07-11 19:50:21,376 [ 181909]  DEBUG - lij.coverage.ApexCoverageSuite - Processing coverage information for EncryptionUtils 
    2016-07-11 19:50:21,376 [ 181909]  DEBUG - lij.coverage.ApexCoverageSuite -   Lines covered = 25; lines uncovered = 0 
    2016-07-11 19:50:21,376 [ 181909]  DEBUG - lij.coverage.ApexCoverageSuite -   Covered lines = { 7, 9, 20, 21, 22, 25, 28, 30, 31, 32, 34, 35, 36, 40, 41, 42, 43, 44, 45, 47, 48, 50, 54, 59, 60 } 
    ...
    2016-07-11 19:50:21,528 [ 182061]  DEBUG - lij.coverage.ApexCoverageSuite - Processing line data for EncryptionUtils 
    2016-07-11 19:50:21,528 [ 182061]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting or creating class data 
    2016-07-11 19:50:21,528 [ 182061]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting the line count 
    2016-07-11 19:50:21,528 [ 182061]  DEBUG - lij.coverage.ApexCoverageSuite -   Line count = 0 
    ... 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine - Getting qualified names for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine -   Processing as an Apex class file. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine -   Added qualified name for type declaration EncryptionUtils. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine -   Returning the following qualified names: { EncryptionUtils }. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine - C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls is not a library class. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine - Getting qualified names for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls. 
    2016-07-11 19:50:38,219 [ 198752]  DEBUG - ij.coverage.ApexCoverageEngine -   Processing as an Apex class file. 
    2016-07-11 19:50:38,220 [ 198753]  DEBUG - ij.coverage.ApexCoverageEngine -   Added qualified name for type declaration EncryptionUtils. 
    2016-07-11 19:50:38,220 [ 198753]  DEBUG - ij.coverage.ApexCoverageEngine -   Returning the following qualified names: { EncryptionUtils }. 
    2016-07-11 19:50:38,220 [ 198753]  DEBUG - ij.coverage.ApexCoverageEngine - The qualified name for C:/Users/xxx/IdeaProjects/xxx/src/classes/EncryptionUtils.cls is EncryptionUtils. 
    
  13. Scott Wells repo owner

    Oh, that's still an old build. Running a build now with significantly more debug info in this area. I'll post it in the next couple of minutes. Sorry for the confusion!

  14. Torsten Rost reporter

    Ok, I'll check that new build tomorrow .. time to leave the office ... in Germany ;-)

  15. Scott Wells repo owner

    Here you go. Let's see what comes from this. I have a few guesses just based on going through the code to instrument it with logging. Hopefully this will help us get to the bottom of this!

  16. Torsten Rost reporter

    OK, ok, ... I'm still here ;-)

    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite - Processing line data for EncryptionUtils 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting or creating class data 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite -   Getting the line count 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite - Getting the line count for class/trigger EncryptionUtils 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite - No project found for the coverage suite. Trying to find an open project with name xxx. 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite -   Checking cic. 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite -   It's a match. 
    2016-07-11 20:03:37,012 [  40240]  DEBUG - lij.coverage.ApexCoverageSuite -   Searching for the symbol as a class. 
    2016-07-11 20:03:37,014 [  40242]  DEBUG - lij.coverage.ApexCoverageSuite -   Found 2 matching classes. 
    2016-07-11 20:03:37,014 [  40242]   WARN - lij.coverage.ApexCoverageSuite - Failed to find a class or trigger file for EncryptionUtils. 
    2016-07-11 20:03:37,014 [  40242]  DEBUG - lij.coverage.ApexCoverageSuite -   Line count = 0 
    
  17. Scott Wells repo owner

    Yep, that's what I thought it might be...two classes with the same name and I'm not sure which to use, so I don't use either. Can you explain the relationship of these two classes named EncryptionUtils relative to the class for which you're trying to get coverage? It's funny...I left a TODO in this code for myself suggesting that I narrow the search scope when looking for matching classes, and I'm pretty sure the fix here will be to implement that TODO!

  18. Scott Wells repo owner

    Okay, here's a new build for you to try out tomorrow morning. There are two changes here: 1) it now uses a more constrained search filter based on the test suite's connection when trying to resolve the named class/trigger to a local source file; 2) if there are still multiple hits for a class/trigger name, it shows the paths of the files that were found.

    Hopefully the first resolves the issue for you, but if not I'll need to talk to you about why there are multiple files with the same name associated with a single connection. Salesforce only sends the class/trigger name back with the code coverage results, so it's important that I can unambiguously associate each name with a single file.

  19. Torsten Rost reporter

    Good morning,

    something is wrong with the attached Build. There are only two Errors in the log (after Startup-Finished):

    2016-07-12 07:03:51,191 [  24585]  ERROR - stubs.StubProcessingHelperBase - IdeaLoggingEvent[message=PSI and index do not match, throwable=Please report the problem to JetBrains with the file attached
     file=Apex(XxxXxxRestClient.cls), file.class=class com.illuminatedcloud.intellij.filetype.ApexClassFile, file.lang=Language: Apex, modStamp=0
     tree consistent
     stub debugInfo=created in getStubTree(), no AST; with backReference
     document before=null
    latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=ApexClassFileStub}18464042
       same size=true
       debugInfo=created from index; with backReference
     viewProvider=SingleRootFileViewProvider{myVirtualFile=file://C:/Users/XXX/IdeaProjects/xxx/src2merge/classes/XxxXxxRestClient.cls, content=VirtualFileContent{size=2854}}
     viewProvider stamp: 0; file stamp: 0; file modCount: 1468258440766; file length: 2854
     doc saved: true; doc stamp: 0; doc size: 2817; committed: true
    in many projects: false
    indexing info: indexed at 1468258440766 with size 2817
    java.lang.Throwable
        at com.intellij.psi.impl.DebugUtil.currentStackTrace(DebugUtil.java:497)
        at com.intellij.psi.stubs.StubProcessingHelper.stubTreeAndIndexDoNotMatch(StubProcessingHelper.java:43)
        at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:172)
        at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:154)
        at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
        at com.intellij.psi.stubs.StubIndexImpl$1.process(StubIndexImpl.java:231)
        at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:582)
        at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:570)
        at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:81)
        at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:252)
        at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:223)
        at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:212)
        at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:77)
        at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:96)
        at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:201)
        at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:191)
        at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:39)
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.get(SourceFile:28)
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.findDeclaration(SourceFile:34)
        at com.illuminatedcloud.intellij.psi.impl.ApexMethodDeclarationMixin.getBaseDeclarations(SourceFile:118)
        at com.illuminatedcloud.intellij.psi.impl.ApexTypeDeclarationMixin.getAccessibleBodyDeclarations(SourceFile:143)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.tryAsContinuationOfRefExpression(SourceFile:269)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.getReferencesNoCache(SourceFile:108)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin$1.doGetReferences(SourceFile:94)
        at com.illuminatedcloud.intellij.psi.impl.PsiReferenceCache.compute(SourceFile:66)
        at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:136)
        at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
        at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
        at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:66)
        at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
        at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:84)
        at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:132)
        at com.illuminatedcloud.intellij.psi.impl.PsiReferenceCache.getReferences(SourceFile:58)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.getReferences(SourceFile:86)
        at com.illuminatedcloud.intellij.editor.IlluminatedCloudSyntaxAnnotator.annotate(SourceFile:74)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:162)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:103)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:354)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:288)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:308)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:280)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
        at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
        at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
        at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1177)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
        at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
        at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
        at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
        at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
        at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
    ] 
    2016-07-12 07:03:51,269 [  24663]  ERROR - stubs.StubProcessingHelperBase - IdeaLoggingEvent[message=PSI and index do not match, throwable=Please report the problem to JetBrains with the file attached
     file=Apex(XxxXxxRestClient.cls), file.class=class com.illuminatedcloud.intellij.filetype.ApexClassFile, file.lang=Language: Apex, modStamp=0
     tree consistent
     stub debugInfo=created in getStubTree(), no AST; with backReference
     document before=null
    latestIndexedStub=StubTree{myDebugInfo='created from index; with backReference', myRoot=ApexClassFileStub}27381430
       same size=true
       debugInfo=created from index; with backReference
     viewProvider=SingleRootFileViewProvider{myVirtualFile=file://C:/Users/XXX/IdeaProjects/XXX/src2merge/classes/XxxXxxRestClient.cls, content=VirtualFileContent{size=2854}}
     viewProvider stamp: 0; file stamp: 0; file modCount: 1468258440766; file length: 2854
     doc saved: true; doc stamp: 0; doc size: 2817; committed: true
    in many projects: false
    indexing info: indexed at 1468258440766 with size 2817
    java.lang.Throwable
        at com.intellij.psi.impl.DebugUtil.currentStackTrace(DebugUtil.java:497)
        at com.intellij.psi.stubs.StubProcessingHelper.stubTreeAndIndexDoNotMatch(StubProcessingHelper.java:43)
        at com.intellij.psi.stubs.StubProcessingHelperBase.inconsistencyDetected(StubProcessingHelperBase.java:172)
        at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:154)
        at com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:52)
        at com.intellij.psi.stubs.StubIndexImpl$1.process(StubIndexImpl.java:231)
        at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:582)
        at com.intellij.psi.stubs.StubIndexImpl$StubIdListContainerAction.perform(StubIndexImpl.java:570)
        at com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:81)
        at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:252)
        at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:223)
        at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:212)
        at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:77)
        at com.intellij.psi.stubs.StubIndex.process(StubIndex.java:96)
        at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:201)
        at com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:191)
        at com.intellij.psi.stubs.AbstractStubIndex.get(AbstractStubIndex.java:39)
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.get(SourceFile:28)
        at com.illuminatedcloud.intellij.index.AbstractApexDeclarationStubIndex.findDeclaration(SourceFile:34)
        at com.illuminatedcloud.intellij.psi.impl.ApexMethodDeclarationMixin.getBaseDeclarations(SourceFile:118)
        at com.illuminatedcloud.intellij.psi.impl.ApexTypeDeclarationMixin.getAccessibleBodyDeclarations(SourceFile:143)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.tryAsContinuationOfRefExpression(SourceFile:269)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.getReferencesNoCache(SourceFile:108)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin$1.doGetReferences(SourceFile:94)
        at com.illuminatedcloud.intellij.psi.impl.PsiReferenceCache.compute(SourceFile:66)
        at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:136)
        at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:49)
        at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:222)
        at com.intellij.psi.impl.PsiCachedValue.getValueWithLock(PsiCachedValue.java:66)
        at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:38)
        at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:84)
        at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:132)
        at com.illuminatedcloud.intellij.psi.impl.PsiReferenceCache.getReferences(SourceFile:58)
        at com.illuminatedcloud.intellij.psi.impl.ApexSimpleRefExpressionMixin.getReferences(SourceFile:86)
        at com.illuminatedcloud.intellij.editor.IlluminatedCloudSyntaxAnnotator.annotate(SourceFile:74)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:162)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:103)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:354)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$100(GeneralHighlightingPass.java:65)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$3.run(GeneralHighlightingPass.java:288)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:308)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.access$200(GeneralHighlightingPass.java:65)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass$4.run(GeneralHighlightingPass.java:314)
        at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:87)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:280)
        at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:219)
        at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
        at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:67)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
        at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1177)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
        at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
        at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
        at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
        at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
        at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
        at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
    ] 
    

    And no lines are marked as covered or not.

    And yes, I have 4 connections configured in my Projekt. (4 Sandboxes) ... and on all Sandboxes are the same Classes. But for all connections the classes are unique (it's not possible to create two classes with the same name in Salesforce).

    I thought it's ok, to have more the one connection configured in one project? It's not a feature, that I'm able to switch between different connections?

  20. Scott Wells repo owner

    Hey, sorry for the delayed reply. I think you sent this just after I crashed for the night. Sorry that I sent you a bad build. That's really odd... Four connections is fine! Like I said, I had that TODO marker in there to make the search more specific to the coverage suite's connection. Let me see if I can spin up a build for you that will allow you to verify the fix. More coming in the next few minutes if you're game for another try.

  21. Scott Wells repo owner

    Okay, here's another build. I've verified it in my own local environment. If you see the same type of thing after installing it, please rebuild your caches (in the IC connection config) and let the IDE restart. Let me know your findings!

  22. Torsten Rost reporter

    With this build the log tells us the readson :-)

    We have (beside the src - directory) a directory "src2merge". This directory is not synchronized with Salesforce by illuminated cloud. But there is a copy of each class. If I mark that directory as "exclude" in module settings, It works :-) That is fine for us.

    Maybe, it makes sense to look for the class files only in the "src" directory. As far as I understand, the directory with the "managed by illuminated cloud meta data" is always "src".

    Thanks for support!

    How can I go back to the official build? Does intellij autmaticly install the next new published version?

  23. Scott Wells repo owner

    Ah, I see. Well, I'm currently using IntelliJ IDEA's notion of source roots to tell me which directories contain source. This will become more important when I enhance the static resource bundle feature to include cross-tool compatibility with Mavens Mate (and others?) that place the exploded archives in a separate source root. You should use IntelliJ IDEA's exclude concept to tell it which files to explicitly ignore. Otherwise it will included these in its indices if they're under content roots.

    As for going back to an official build, it'll happen automatically when a new version is uploaded. Coincidentally that's going to happen VERY soon because I'm building/testing a fix for an incompatibility with the newly-released IntelliJ IDEA 2016.2. That build doesn't have the additional debug logging for this problem, though. It's a direct patch to the base 1.7.2.7. I'll have the stuff from your test build in 1.7.2.9 which I'll likely release later this week or next Monday. It sounds like if you exclude the other directory, though, things should be fine even on the official build.

    Thanks for helping track this down!

  24. Log in to comment