List<ValidationInfo> () { final JRootPane component = getRootPane(); if (component == null || myPerformAction) { return Collections.emptyList(); } final List<ValidationInfo> errors = new SmartList<>(); saveConfiguration(); final MatchOptions matchOptions = myConfiguration.getMatchOptions(); try { CompiledPattern compiledPattern = null; try { compiledPattern = PatternCompiler.compilePattern(myProject, matchOptions, true, !myEditConfigOnly && !myPerformAction); } catch (MalformedPatternException e) { removeMatchHighlights(); if (!StringUtil.isEmptyOrSpaces(matchOptions.getSearchPattern())) { final String message = e.getMessage(); errors.add(new ValidationInfo((message == null) ? SSRBundle.message("this.pattern.is.malformed.message") : message, mySearchCriteriaEdit)); } } catch (UnsupportedPatternException | NoMatchFoundException e) { removeMatchHighlights(); errors.add(new ValidationInfo(e.getMessage(), mySearchCriteriaEdit)); } if (myReplace) { try { Replacer.checkReplacementPattern(myProject, myConfiguration.getReplaceOptions()); } catch (UnsupportedPatternException | MalformedPatternException e) { errors.add(new ValidationInfo(e.getMessage(), myReplaceCriteriaEdit)); } } initializeFilterPanel(compiledPattern); if (compiledPattern != null) { addMatchHighlights(); } else { errors.add(new ValidationInfo("")); } ApplicationManager.getApplication().invokeLater(() -> setSearchTargets(myConfiguration.getMatchOptions()), ModalityState.stateForComponent(component)); } catch (ProcessCanceledException e) { throw e; } catch (RuntimeException e) { Logger.getInstance(StructuralSearchDialog.class).error(e); } return errors; }