void (boolean enabled) { myCbSearchInComments.setEnabled(enabled); myCbSearchTextOccurences.setEnabled(enabled); if (enabled) { myCbSearchInComments.setSelected(isSearchInCommentsAndStrings()); myCbSearchTextOccurences.setSelected(isSearchForTextOccurrences()); } else { myCbSearchInComments.setSelected(false); myCbSearchTextOccurences.setSelected(false); } }