mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
safe delete: allow to delete parameter in one method without hierarchy (IDEA-135686)
This commit is contained in:
@@ -147,8 +147,10 @@ public class JavaSafeDeleteProcessor extends SafeDeleteProcessorDelegateBase {
|
||||
|
||||
if (parametersToDelete.size() > 1 && !ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
String message = RefactoringBundle.message("0.is.a.part.of.method.hierarchy.do.you.want.to.delete.multiple.parameters", UsageViewUtil.getLongName(method));
|
||||
if (Messages.showYesNoDialog(project, message, SafeDeleteHandler.REFACTORING_NAME,
|
||||
Messages.getQuestionIcon()) != Messages.YES) return null;
|
||||
int result = Messages.showYesNoCancelDialog(project, message, SafeDeleteHandler.REFACTORING_NAME,
|
||||
Messages.getQuestionIcon());
|
||||
if (result == Messages.CANCEL) return null;
|
||||
if (result == Messages.NO) return Collections.singletonList(element);
|
||||
}
|
||||
return parametersToDelete;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user