void () { final ThreeStateCheckBox.State state; if (mySubstitutionParameters.isAllSubstituted()) { state = ThreeStateCheckBox.State.SELECTED; } else if (mySubstitutionParameters.isNoneSubstituted()) { state = ThreeStateCheckBox.State.NOT_SELECTED; } else { state = ThreeStateCheckBox.State.DONT_CARE; } myShowContentCheckBox.setThirdStateEnabled(state == ThreeStateCheckBox.State.DONT_CARE); myShowContentCheckBox.setState(state); onShowContentSettingsChanged(); }