Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
Dmitry Jemerov
2010-01-18 20:26:42 +03:00
15 changed files with 133 additions and 576 deletions
@@ -1,14 +1,14 @@
package com.intellij.refactoring;
import com.intellij.JavaTestUtil;
import com.intellij.codeInsight.TargetElementUtilBase;
import com.intellij.testFramework.IdeaTestUtil;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.refactoring.safeDelete.SafeDeleteHandler;
import com.intellij.JavaTestUtil;
import com.intellij.testFramework.IdeaTestUtil;
import org.jetbrains.annotations.NonNls;
import java.io.File;
@@ -61,6 +61,17 @@ public class SafeDeleteTest extends MultiFileTestCase {
doTest("UserFlags");
}
public void testRemoveOverridersInspiteOfUnsafeUsages() throws Exception {
myDoCompare = false;
try {
BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(true);
doTest("A");
}
finally {
BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(false);
}
}
private void doTest(@NonNls final String qClassName) throws Exception {
doTest(new PerformAction() {
public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception {
@@ -49,6 +49,14 @@ public class MoveInstanceMethodTest extends LightCodeInsightTestCase {
doTest(true, 0, VisibilityUtil.ESCALATE_VISIBILITY);
}
public void testSameNames() throws Exception {
doTest(true, 0);
}
public void testSameNamesRecursion() throws Exception {
doTest(true, 0);
}
private void doTest(boolean isTargetParameter, final int targetIndex) throws Exception {
doTest(isTargetParameter, targetIndex, null);
}