ignore completely automatic renamer if conllision was found (IDEA-13684)

This commit is contained in:
anna
2010-01-21 15:47:59 +03:00
parent d6d72f4eeb
commit 2b5f3391b7
10 changed files with 112 additions and 20 deletions

View File

@@ -48,15 +48,19 @@ public class RenameLocalTest extends LightCodeInsightTestCase {
}
public void testRenameInPlaceQualifyFieldReference() throws Exception {
doTestInplaceRenameCollisionsResolved("myI");
doTestInplaceRename("myI");
}
public void testRenameInPlaceParamInOverriderAutomaticRenamer() throws Exception {
doTestInplaceRenameCollisionsResolved("pp");
doTestInplaceRename("pp");
}
public void testRenameInPlaceParamInOverriderAutomaticRenamerConflict() throws Exception {
doTestInplaceRename("pp");
}
//reference itself won't be renamed
private void doTestInplaceRenameCollisionsResolved(String newName) throws Exception {
private void doTestInplaceRename(String newName) throws Exception {
configureByFile(BASE_PATH + "/" + getTestName(false) + ".java");
PsiElement element = TargetElementUtilBase.findTargetElement(myEditor, TargetElementUtilBase.ELEMENT_NAME_ACCEPTED);
assertNotNull(element);