void () { CodeInsightSettings settings = CodeInsightSettings.getInstance(); boolean oldValue = settings.SURROUND_SELECTION_ON_QUOTE_TYPED; settings.SURROUND_SELECTION_ON_QUOTE_TYPED = false; boolean oldValuePairQuote = settings.AUTOINSERT_PAIR_QUOTE; settings.AUTOINSERT_PAIR_QUOTE = false; try { checkTyping("a.cs", "<caret><selection>\"</selection>a\"", '\'', "'<caret>a\""); checkTyping("a.cs", "<caret><selection>\"</selection>a'", '\'', "'<caret>a'"); checkTyping("a.cs", "\"a<caret><selection>\"</selection>", '\'', "\"a'<caret>"); checkTyping("a.cs", "'a<caret><selection>\"</selection>", '\'', "'a'<caret>"); checkTyping("a.cs", "<caret><selection>'</selection>a\"", '\"', "\"<caret>a\""); checkTyping("a.cs", "<caret><selection>'</selection>a'", '\"', "\"<caret>a'"); checkTyping("a.cs", "\"a<caret><selection>'</selection>", '\"', "\"a\"<caret>"); checkTyping("a.cs", "'a<caret><selection>'</selection>", '\"', "'a\"<caret>"); } finally { settings.SURROUND_SELECTION_ON_QUOTE_TYPED = oldValue; settings.AUTOINSERT_PAIR_QUOTE = oldValuePairQuote; } }