keymap: warn about not loaded actions ( IDEA-53679 )
authoranna <anna.kozlova@jetbrains.com>
Mon, 26 Apr 2010 13:54:25 +0000 (17:54 +0400)
committeranna <anna.kozlova@jetbrains.com>
Mon, 26 Apr 2010 13:56:51 +0000 (17:56 +0400)
platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/KeyboardShortcutDialog.java

index 81232801fe90fc7b0023cd4fd5dfdea769123a3b..bcc340c7c5ddfdf5c86cb6640dc214680d549adb 100644 (file)
@@ -188,17 +188,17 @@ public class KeyboardShortcutDialog extends DialogWrapper {
 
     Set<String> keys = conflicts.keySet();
     String[] actionIds = ArrayUtil.toStringArray(keys);
+    boolean loaded = true;
     for (String actionId : actionIds) {
       String actionPath = myMainGroup.getActionQualifiedPath(actionId);
-      // actionPath == null for editor actions having corresponding $-actions
       if (actionPath == null) {
-        continue;
+        loaded = false;
       }
       if (buffer.length() > 1) {
         buffer.append('\n');
       }
       buffer.append('[');
-      buffer.append(actionPath);
+      buffer.append(actionPath != null ? actionPath : actionId);
       buffer.append(']');
     }
 
@@ -208,7 +208,11 @@ public class KeyboardShortcutDialog extends DialogWrapper {
     }
     else {
       myConflictInfoArea.setForeground(Color.red);
-      myConflictInfoArea.setText(KeyMapBundle.message("assigned.to.info.message", buffer.toString()));
+      if (loaded) {
+        myConflictInfoArea.setText(KeyMapBundle.message("assigned.to.info.message", buffer.toString()));
+      } else {
+        myConflictInfoArea.setText("Assigned to " + buffer.toString() + " which is still not loaded");
+      }
     }
   }