Search in sources :

Example 1 with JavaCoverageRunner

use of com.intellij.coverage.JavaCoverageRunner in project intellij-community by JetBrains.

the class JavaCoverageEnabledConfiguration method appendCoverageArgument.

public void appendCoverageArgument(RunConfigurationBase configuration, final SimpleJavaParameters javaParameters) {
    final CoverageRunner runner = getCoverageRunner();
    try {
        if (runner != null && runner instanceof JavaCoverageRunner) {
            final String path = getCoverageFilePath();
            // cannot be null here if runner != null
            assert path != null;
            String sourceMapPath = null;
            if (myCoverageProvider.isSourceMapNeeded(configuration)) {
                sourceMapPath = getSourceMapPath(path);
            }
            ((JavaCoverageRunner) runner).appendCoverageArgument(new File(path).getCanonicalPath(), getPatterns(), javaParameters, isTrackPerTestCoverage() && !isSampling(), isSampling(), sourceMapPath);
        }
    } catch (IOException e) {
        LOG.info(e);
    }
}
Also used : CoverageRunner(com.intellij.coverage.CoverageRunner) IDEACoverageRunner(com.intellij.coverage.IDEACoverageRunner) JavaCoverageRunner(com.intellij.coverage.JavaCoverageRunner) JavaCoverageRunner(com.intellij.coverage.JavaCoverageRunner) IOException(java.io.IOException) File(java.io.File)

Aggregations

CoverageRunner (com.intellij.coverage.CoverageRunner)1 IDEACoverageRunner (com.intellij.coverage.IDEACoverageRunner)1 JavaCoverageRunner (com.intellij.coverage.JavaCoverageRunner)1 File (java.io.File)1 IOException (java.io.IOException)1