void () { boolean oldSettings = CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED; try { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = true; doTest('[', "<caret><selection>abc</selection>", "[abc]"); } finally { CodeInsightSettings.getInstance().SURROUND_SELECTION_ON_QUOTE_TYPED = oldSettings; } }