Pattern (CodeStyleSettings settings, JTextField field, String patternText) { try { return Pattern.compile(patternText); } catch (PatternSyntaxException pse) { settings.FORMATTER_TAGS_ACCEPT_REGEXP = false; showError(field, ApplicationBundle.message("settings.code.style.general.formatter.marker.invalid.regexp")); return null; } }