void () { if (!getOKAction().isEnabled()) return; if (!myPinned) close(OK_EXIT_CODE); removeMatchHighlights(); myAlarm.cancelAllRequests(); myConfiguration.removeUnusedVariables(); if (myEditConfigOnly) return; final SearchScope scope = myScopePanel.getScope(); if (scope instanceof GlobalSearchScopesCore.DirectoryScope directoryScope) { FindInProjectSettings.getInstance(myProject).addDirectory(directoryScope.getDirectory().getPresentableUrl()); } FindSettings.getInstance().setShowResultsInSeparateView(myOpenInNewTab.isSelected()); ConfigurationManager.getInstance(myProject).addHistoryConfiguration(getConfiguration()); startSearching(); }