diff options
Diffstat (limited to 'gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java')
-rw-r--r-- | gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java index 1e62bc2571..93006f5bcb 100644 --- a/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java +++ b/gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/view/CovView.java @@ -141,8 +141,13 @@ public class CovView extends AbstractSTDataView { public static void displayCovDetailedResult(String binaryPath, String gcdaFile) {
try {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IFile binary = root.getFileForLocation(new Path(binaryPath));
+ IProject project = null;
+ if (binary != null) project = binary.getProject();
+
// parse and process coverage data
- CovManager cvrgeMnger = new CovManager(binaryPath);
+ CovManager cvrgeMnger = new CovManager(binaryPath, project);
List<String> gcdaPaths = new LinkedList<String>();
gcdaPaths.add(gcdaFile);
cvrgeMnger.processCovFiles(gcdaPaths, gcdaFile);
@@ -150,10 +155,6 @@ public class CovView extends AbstractSTDataView { cvrgeMnger.fillGcovView();
for (SourceFile sf : cvrgeMnger.getSourceMap().values()) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile binary = root.getFileForLocation(new Path(binaryPath));
- IProject project = null;
- if (binary != null) project = binary.getProject();
OpenSourceFileAction.sharedInstance.openAnnotatedSourceFile(project,
binary, sf, 0);
}
@@ -176,8 +177,14 @@ public class CovView extends AbstractSTDataView { public static CovView displayCovResults(String binaryPath, String gcda) {
try {
+
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ IFile binary = root.getFileForLocation(new Path(binaryPath));
+ IProject project = null;
+ if (binary != null) project = binary.getProject();
+
// parse and process coverage data
- CovManager cvrgeMnger = new CovManager(binaryPath);
+ CovManager cvrgeMnger = new CovManager(binaryPath, project);
List<String> gcdaPaths = cvrgeMnger.getGCDALocations();
cvrgeMnger.processCovFiles(gcdaPaths, gcda);
// generate model for view
|