void () { FindModel myModel = myHelper.getModel(); myCaseSensitiveState.set(myModel.isCaseSensitive()); myWholeWordsState.set(myModel.isWholeWordsOnly()); myRegexState.set(myModel.isRegularExpressions()); mySelectedContextName = getSearchContextName(myModel); myPreserveCaseState.set(myModel.isPreserveCase()); mySelectedScope = myScopeUI.initByModel(myModel); boolean isThereFileFilter = myModel.getFileFilter() != null && !myModel.getFileFilter().isEmpty(); try { header.cbFileFilter.putClientProperty("dontRequestFocus", Boolean.TRUE); header.cbFileFilter.setSelected(isThereFileFilter); } finally { header.cbFileFilter.putClientProperty("dontRequestFocus", null); } header.fileMaskField.removeAllItems(); FindSettings findSettings = FindSettings.getInstance(); @NlsSafe String[] fileMasks = findSettings.getRecentFileMasks(); for (int i = fileMasks.length - 1; i >= 0; i--) { header.fileMaskField.addItem(fileMasks[i]); } if (fileMasks.length > 0) { String fileMask = findSettings.getFileMask(); header.fileMaskField.setSelectedItem(fileMask != null ? fileMask : fileMasks[fileMasks.length - 1]); } header.fileMaskField.setEnabled(isThereFileFilter); FindInProjectSettings findInProjectSettings = FindInProjectSettings.getInstance(myProject); String search = myModel.hasStringToFind() ? myModel.getStringToFind() : findInProjectSettings.getMostRecentFindString(); mySearchComponent.setText(search); String replace = myModel.hasStringToFind() ? myModel.getStringToReplace() : findInProjectSettings.getMostRecentReplaceString(); myReplaceComponent.setText(replace); updateControls(); updateScopeDetailsPanel(); boolean isReplaceState = myHelper.isReplaceState(); header.titleLabel.setText(myHelper.getTitle()); myReplaceTextArea.setVisible(isReplaceState); myOKHintLabel.setText(KeymapUtil.getKeystrokeText(ENTER_WITH_MODIFIERS)); myReplaceAllButton.setVisible(isReplaceState); myReplaceSelectedButton.setVisible(isReplaceState); }