mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
suggest to delete method overriders even if conflicts were found (IDEA-51577)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user