mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
safe delete: check hierarchy excluding current method (IDEA-150176)
This commit is contained in:
@@ -172,7 +172,7 @@ public class JavaSafeDeleteProcessor extends SafeDeleteProcessorDelegateBase {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (!overriders.isEmpty()) {
|
||||
if (overriders.size() > 1) {
|
||||
String message = RefactoringBundle.message("0.is.a.part.of.method.hierarchy.do.you.want.to.delete.multiple.type.parameters", UsageViewUtil.getLongName(owner));
|
||||
int result = ApplicationManager.getApplication().isUnitTestMode()
|
||||
? Messages.YES :Messages.showYesNoCancelDialog(project, message, SafeDeleteHandler.REFACTORING_NAME, Messages.getQuestionIcon());
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
public <<caret>T> void foo() {}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class A {
|
||||
public void foo() {}
|
||||
}
|
||||
@@ -280,6 +280,10 @@ public class SafeDeleteTest extends MultiFileTestCase {
|
||||
public void testTypeParameterWithinMethodHierarchy() throws Exception {
|
||||
doSingleFileTest();
|
||||
}
|
||||
|
||||
public void testTypeParameterNoMethodHierarchy() throws Exception {
|
||||
doSingleFileTest();
|
||||
}
|
||||
|
||||
public void testClassWithInnerStaticImport() throws Exception {
|
||||
doTest("ClassWithInnerStaticImport");
|
||||
|
||||
Reference in New Issue
Block a user