void () { String origText = "ab abc abcd"; init(origText); initFind(); EditorSearchSession session = getEditorSearchComponent(); FindModel model = session.getFindModel(); SearchReplaceComponent component = session.getComponent(); ActionButton actionButton = findActionButton(component, "find.whole.words"); assertFalse(model.isWholeWordsOnly()); // default is false assertFalse(actionButton.isSelected()); model.setStringToFind("abc"); assertEquals(ApplicationBundle.message("editorsearch.current.cursor.position", 1, 2), component.getStatusText()); model.setWholeWordsOnly(true); assertTrue(actionButton.isSelected()); assertEquals(ApplicationBundle.message("editorsearch.current.cursor.position", 1, 1), component.getStatusText()); }