introduce: pass error message if non-physical expression can't be extracted

This commit is contained in:
anna
2011-07-11 17:53:42 +04:00
parent 0e1ae3cb0b
commit 9cbf19e193
5 changed files with 44 additions and 9 deletions
@@ -271,7 +271,8 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase {
doTest(new MockIntroduceVariableHandler("sum", true, true, false, "int"){
@Override
protected void showErrorMessage(Project project, Editor editor, String message) {
assertEquals("Cannot perform refactoring.\n" + "Selected block should represent an expression.", message);
assertEquals("Cannot perform refactoring.\n" +
"Extracting selected expression would change the semantic of the whole expression.", message);
}
});
}