当前位置: 首页>>代码示例>>Java>>正文


Java CoverageEnabledConfiguration.getOrCreate方法代码示例

本文整理汇总了Java中com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration.getOrCreate方法的典型用法代码示例。如果您正苦于以下问题:Java CoverageEnabledConfiguration.getOrCreate方法的具体用法?Java CoverageEnabledConfiguration.getOrCreate怎么用?Java CoverageEnabledConfiguration.getOrCreate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration的用法示例。


在下文中一共展示了CoverageEnabledConfiguration.getOrCreate方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isListenerDisabled

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
@Override
public boolean isListenerDisabled(RunConfigurationBase configuration, Object listener, RunnerSettings runnerSettings) {
  if (listener instanceof CoverageListener) {
    if (!(runnerSettings instanceof CoverageRunnerData)) return true;
    final CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(configuration);
    return !(coverageEnabledConfiguration.getCoverageRunner() instanceof IDEACoverageRunner) || 
           !(coverageEnabledConfiguration.isTrackPerTestCoverage() && !coverageEnabledConfiguration.isSampling());
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:CoverageJavaRunConfigurationExtension.java

示例2: resetCoverageSuit

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:CoverageHelper.java

示例3: processGatheredCoverage

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CoverageDataManagerImpl.java

示例4: doExecute

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
@Nullable
@Override
protected RunContentDescriptor doExecute(RunProfileState profile, ExecutionEnvironment env)
    throws ExecutionException {
  WorkspaceRoot root = WorkspaceRoot.fromProjectSafe(env.getProject());
  if (root == null) {
    return null;
  }
  RunContentDescriptor result = super.doExecute(profile, env);
  if (result == null) {
    return null;
  }
  // remove any old copy of the coverage data

  // retrieve coverage data and copy locally
  BlazeCommandRunConfiguration blazeConfig = (BlazeCommandRunConfiguration) env.getRunProfile();
  BlazeCoverageEnabledConfiguration config =
      (BlazeCoverageEnabledConfiguration) CoverageEnabledConfiguration.getOrCreate(blazeConfig);

  String coverageFilePath = config.getCoverageFilePath();
  File blazeOutputFile = CoverageUtils.getOutputFile(root);

  ProcessHandler handler = result.getProcessHandler();
  if (handler != null) {
    ProcessHandler wrappedHandler =
        new ProcessHandlerWrapper(
            handler, exitCode -> copyCoverageOutput(blazeOutputFile, coverageFilePath, exitCode));
    CoverageHelper.attachToProcess(blazeConfig, wrappedHandler, env.getRunnerSettings());
  }
  return result;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:32,代码来源:BlazeCoverageProgramRunner.java

示例5: configureSuite

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
private void configureSuite(RunConfigurationBase runConfiguration, Project project, String reportDir) {
    CoverageEnabledConfiguration configuration = CoverageEnabledConfiguration.getOrCreate(runConfiguration);
    CoverageRunner currentCoverageRunner = configuration.getCoverageRunner();
    configuration.setCoverageRunner(CoverageRunner.getInstance(PitestCoverageRunner.class));
    CoverageDataManager manager = CoverageDataManager.getInstance(project);
    CoverageSuite suite = manager.addCoverageSuite(configuration);
    configuration.setCurrentCoverageSuite(suite);
    configuration.setCoverageRunner(currentCoverageRunner);
    if (reportDir != null) {
        createSessionDataFile(configuration, reportDir);
    }
}
 
开发者ID:artspb,项目名称:idea-pitest,代码行数:13,代码来源:PitestCommandLineState.java

示例6: doReadExternal

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
public static void doReadExternal(RunConfigurationBase runConfiguration, Element element) throws InvalidDataException {
  final CoverageEnabledConfiguration covConf = CoverageEnabledConfiguration.getOrCreate(runConfiguration);

  covConf.readExternal(element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CoverageHelper.java

示例7: doWriteExternal

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
public static void doWriteExternal(RunConfigurationBase runConfiguration, Element element) throws WriteExternalException {
  final CoverageEnabledConfiguration covConf = CoverageEnabledConfiguration.getOrCreate(runConfiguration);

  covConf.writeExternal(element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CoverageHelper.java

示例8: get

import com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration; //导入方法依赖的package包/类
@NotNull
public static DotNetCoverageEnabledConfiguration get(DotNetConfigurationWithCoverage configurationWithCoverage)
{
	return (DotNetCoverageEnabledConfiguration) CoverageEnabledConfiguration.getOrCreate((RunConfigurationBase) configurationWithCoverage);
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:6,代码来源:DotNetCoverageEnabledConfiguration.java


注:本文中的com.intellij.execution.configurations.coverage.CoverageEnabledConfiguration.getOrCreate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。