use of com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration in project intellij-community by JetBrains.
the class CoverageDataManagerImpl method processGatheredCoverage.
public static void processGatheredCoverage(RunConfigurationBase configuration) {
final Project project = configuration.getProject();
if (project.isDisposed())
return;
final CoverageDataManager coverageDataManager = CoverageDataManager.getInstance(project);
final CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(configuration);
//noinspection ConstantConditions
final CoverageSuite coverageSuite = coverageEnabledConfiguration.getCurrentCoverageSuite();
if (coverageSuite != null) {
((BaseCoverageSuite) coverageSuite).setConfiguration(configuration);
coverageDataManager.coverageGathered(coverageSuite);
}
}
use of com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration in project intellij-community by JetBrains.
the class CoverageHelper method resetCoverageSuit.
public static void resetCoverageSuit(RunConfigurationBase configuration) {
final CoverageEnabledConfiguration covConfig = CoverageEnabledConfiguration.getOrCreate(configuration);
// reset coverage suite
covConfig.setCurrentCoverageSuite(null);
// register new coverage suite
final CoverageDataManager coverageDataManager = CoverageDataManager.getInstance(configuration.getProject());
covConfig.setCurrentCoverageSuite(coverageDataManager.addCoverageSuite(covConfig));
}
use of com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration in project intellij-plugins by JetBrains.
the class JstdCoverageProgramRunner method start.
@Nullable
private static RunContentDescriptor start(@Nullable JstdServer server, @NotNull ExecutionEnvironment environment) throws ExecutionException {
FileDocumentManager.getInstance().saveAllDocuments();
JstdRunConfiguration runConfiguration = (JstdRunConfiguration) environment.getRunProfile();
CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration);
String coverageFilePath = coverageEnabledConfiguration.getCoverageFilePath();
JstdRunProfileState jstdState = new JstdRunProfileState(environment, runConfiguration.getRunSettings(), coverageFilePath);
ExecutionResult executionResult = jstdState.executeWithServer(server);
RunContentBuilder contentBuilder = new RunContentBuilder(executionResult, environment);
final RunContentDescriptor descriptor = contentBuilder.showRunContent(environment.getContentToReuse());
ProcessHandler processHandler = executionResult.getProcessHandler();
if (processHandler instanceof NopProcessHandler) {
if (server != null) {
server.addLifeCycleListener(new JstdServerLifeCycleAdapter() {
@Override
public void onBrowserCaptured(@NotNull JstdBrowserInfo info) {
ExecutionUtil.restartIfActive(descriptor);
server.removeLifeCycleListener(this);
}
}, contentBuilder);
}
} else {
CoverageHelper.attachToProcess(runConfiguration, processHandler, environment.getRunnerSettings());
}
return descriptor;
}
use of com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration in project intellij-community by JetBrains.
the class CoverageHelper method doWriteExternal.
public static void doWriteExternal(RunConfigurationBase runConfiguration, Element element) throws WriteExternalException {
final CoverageEnabledConfiguration covConf = CoverageEnabledConfiguration.getOrCreate(runConfiguration);
covConf.writeExternal(element);
}
use of com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration in project intellij-community by JetBrains.
the class CoverageHelper method doReadExternal.
public static void doReadExternal(RunConfigurationBase runConfiguration, Element element) throws InvalidDataException {
final CoverageEnabledConfiguration covConf = CoverageEnabledConfiguration.getOrCreate(runConfiguration);
covConf.readExternal(element);
}
Aggregations