use of com.intellij.coverage.BaseCoverageSuite in project go-lang-idea-plugin by go-lang-plugin-org.
the class GoCoverageRunner method loadCoverageData.
@Override
public ProjectData loadCoverageData(@NotNull File sessionDataFile, @Nullable CoverageSuite baseCoverageSuite) {
if (!(baseCoverageSuite instanceof BaseCoverageSuite)) {
return null;
}
Project project = baseCoverageSuite.getProject();
if (project == null) {
return null;
}
RunConfigurationBase configuration = ((BaseCoverageSuite) baseCoverageSuite).getConfiguration();
Module module = configuration instanceof ModuleBasedConfiguration ? ((ModuleBasedConfiguration) configuration).getConfigurationModule().getModule() : null;
try {
BufferedReader reader = new BufferedReader(new FileReader(sessionDataFile.getAbsolutePath()));
try {
return parseCoverage(reader, project, module);
} catch (IOException e) {
LOG.warn(e);
} finally {
try {
reader.close();
} catch (IOException e) {
LOG.warn(e);
}
}
} catch (FileNotFoundException e) {
LOG.warn(e);
}
return null;
}
Aggregations