void () { if (myUpdating) return; switch (myScopeType) { case PROJECT -> myScope = GlobalSearchScope.projectScope(myProject); case MODULE -> { final Module module = myModulesComboBox.getSelectedModule(); if (module == null) return; myScope = GlobalSearchScope.moduleScope(module); } case DIRECTORY -> { final VirtualFile directory = myDirectoryComboBox.getDirectory(); if (directory == null) return; myScope = GlobalSearchScopesCore.directoryScope(myProject, directory, myDirectoryComboBox.isRecursive()); } case NAMED -> { final SearchScope namedScope = myScopesComboBox.getSelectedScope(); if (namedScope == null) return; myScope = namedScope; } } if (myConsumer != null) myConsumer.accept(myScope); }