unused declaration: use safe delete action shortcut for safe delete unused elements...
authorDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 27 Jul 2016 13:41:21 +0000 (16:41 +0300)
committerDmitry Batkovich <dmitry.batkovich@jetbrains.com>
Wed, 27 Jul 2016 13:41:57 +0000 (16:41 +0300)
java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java

index 9ae03ce3cef965029fbafba428630201197a2661..20adb5ee0c11dc3beb5d79b3dc6ca4157768f50b 100644 (file)
@@ -23,6 +23,7 @@ import com.intellij.codeInspection.ui.*;
 import com.intellij.codeInspection.util.RefFilter;
 import com.intellij.icons.AllIcons;
 import com.intellij.lang.annotation.HighlightSeverity;
+import com.intellij.openapi.actionSystem.ActionManager;
 import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.editor.Document;
@@ -188,7 +189,8 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta
 
   class PermanentDeleteAction extends QuickFixAction {
     PermanentDeleteAction(@NotNull InspectionToolWrapper toolWrapper) {
-      super(DELETE_QUICK_FIX, AllIcons.Actions.Cancel, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), toolWrapper);
+      super(DELETE_QUICK_FIX, AllIcons.Actions.Cancel, null, toolWrapper);
+      copyShortcutFrom(ActionManager.getInstance().getAction("SafeDelete"));
     }
 
     @Override