coverage: show statistics for file in 'Project Files' view (WEB-17006) appcode/142.3076 clion/142.3078 dbe/142.3077 idea/142.3080 phpstorm/142.3082 pycharm/142.3079 rubymine/142.3081 webstorm/142.3075
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 7 Jul 2015 22:20:09 +0000 (01:20 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 7 Jul 2015 22:20:09 +0000 (01:20 +0300)
plugins/coverage-common/src/com/intellij/coverage/CoverageProjectViewDirectoryNodeDecorator.java

index 15b29a35f4a1ef0a41ff3749d5a8fa64e05acbc6..148408f83fbed3cbd219363f71048252e6f1c11e 100644 (file)
@@ -31,11 +31,15 @@ public class CoverageProjectViewDirectoryNodeDecorator extends AbstractCoverageP
       return;
     }
 
       return;
     }
 
+    String informationString = null;
     if (element instanceof PsiDirectory) {
     if (element instanceof PsiDirectory) {
-      final String informationString = coverageAnnotator.getDirCoverageInformationString((PsiDirectory) element, currentSuite, manager);
-      if (informationString != null) {
-        appendCoverageInfo(cellRenderer, informationString);
-      }
+      informationString = coverageAnnotator.getDirCoverageInformationString((PsiDirectory) element, currentSuite, manager);
+    }
+    else if (element instanceof PsiFile) {
+      informationString = coverageAnnotator.getFileCoverageInformationString((PsiFile)element, currentSuite, manager);
+    }
+    if (informationString != null) {
+      appendCoverageInfo(cellRenderer, informationString);
     }
   }
 
     }
   }