void (CoverageRunner runner, boolean branchCoverage, boolean testTracking) { if (runner instanceof JavaCoverageRunner javaRunner) { final boolean alwaysAvailable = javaRunner.isBranchInfoAvailable(false); final boolean neverAvailable = !javaRunner.isBranchInfoAvailable(true); myBranchCoverageCb.setEnabled(!(alwaysAvailable || neverAvailable)); myBranchCoverageCb.setSelected(javaRunner.isBranchInfoAvailable(branchCoverage)); } else { myBranchCoverageCb.setEnabled(true); myBranchCoverageCb.setSelected(branchCoverage); } final boolean isCoverageByTestApplicable = runner != null && runner.isCoverageByTestApplicable(); myTrackPerTestCoverageCb.setSelected(testTracking); myTrackPerTestCoverageCb.setEnabled(isCoverageByTestApplicable && myBranchCoverageCb.isSelected() && canHavePerTestCoverage()); }