void () { final boolean searchInNonJava = myCbSearchTextOccurences.isSelected(); final boolean searchInComments = myCbSearchInComments.isSelected(); if (myCbSearchInComments.isEnabled() ) { saveSearchInCommentsAndStrings(searchInComments); } if (myCbSearchTextOccurences.isEnabled()) { saveSearchInTextOccurrences(searchInNonJava); } }