Merge remote-tracking branch 'origin/master' into develar/is
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Mon, 11 Jul 2016 14:13:23 +0000 (16:13 +0200)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Mon, 11 Jul 2016 14:13:23 +0000 (16:13 +0200)
# Conflicts:
# plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java
# python/src/com/jetbrains/python/inspections/PyChainedComparisonsInspection.java

1  2 
java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java
java/java-tests/testSrc/com/intellij/codeInsight/daemon/impl/DaemonRespondToChangesTest.java
platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java
platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapImpl.java
platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapManagerImpl.java
platform/testFramework/src/com/intellij/testFramework/LightPlatformTestCase.java
platform/util/resources/misc/registry.properties
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelveChangesManager.java
python/src/com/jetbrains/python/inspections/PyChainedComparisonsInspection.java

index cc69281bfad9d5594103f4a9a260c4013646d77d,937cbfd83ced6cadcc807b7b4a87a528023c7b88..8a81378aed5722beeec6ef9d644b2ab9743500af
@@@ -134,10 -143,34 +141,34 @@@ public class KeymapImpl extends Externa
      return otherKeymap;
    }
  
+   @Nullable
+   private List<String> getChangedActionIds(@NotNull KeymapImpl otherKeymap) {
+     if (!otherKeymap.isInternalKeymapListener()) {
+       return null;
+     }
+     List<String> changedActionIds = new ArrayList<>();
+     Set<String> oldKeys = otherKeymap.myActionId2ListOfShortcuts.keySet();
+     Set<String> newKeys = new HashSet<>(myActionId2ListOfShortcuts.keySet());
+     for (String key : oldKeys) {
+       if (newKeys.remove(key)) {
+         if (!Comparing.equal(otherKeymap.myActionId2ListOfShortcuts.get(key), myActionId2ListOfShortcuts.get(key))) {
+           changedActionIds.add(key);
+         }
+       }
+       else {
+         changedActionIds.add(key);
+       }
+     }
+     changedActionIds.addAll(newKeys);
+     return changedActionIds;
+   }
    public boolean equals(Object object) {
 -    if (!(object instanceof Keymap)) return false;
 +    if (!(object instanceof KeymapImpl)) return false;
      KeymapImpl secondKeymap = (KeymapImpl)object;
 -    if (!Comparing.equal(myName, secondKeymap.myName)) return false;
 +    if (!Comparing.equal(getName(), secondKeymap.getName())) return false;
      if (myCanModify != secondKeymap.myCanModify) return false;
      if (!Comparing.equal(myParent, secondKeymap.myParent)) return false;
      if (!Comparing.equal(myActionId2ListOfShortcuts, secondKeymap.myActionId2ListOfShortcuts)) return false;
index 32303862b906c366024c8c6ab4f210865a9ef13a,28c6c79819dea248db694fffa0efea06f2c95670..d63e2a8695411e83cad4cbcda60abba299a78f33
@@@ -19,11 -19,16 +19,13 @@@ import com.intellij.ide.WelcomeWizardUt
  import com.intellij.openapi.Disposable;
  import com.intellij.openapi.components.*;
  import com.intellij.openapi.keymap.Keymap;
+ import com.intellij.openapi.keymap.KeymapManager;
  import com.intellij.openapi.keymap.KeymapManagerListener;
  import com.intellij.openapi.keymap.ex.KeymapManagerEx;
 -import com.intellij.openapi.options.Scheme;
 -import com.intellij.openapi.options.SchemeProcessor;
 -import com.intellij.openapi.options.SchemesManager;
 -import com.intellij.openapi.options.SchemesManagerFactory;
 +import com.intellij.openapi.options.*;
  import com.intellij.openapi.util.*;
  import com.intellij.openapi.util.text.StringUtil;
+ import com.intellij.util.ParameterizedRunnable;
  import com.intellij.util.containers.ContainerUtil;
  import org.jdom.Element;
  import org.jetbrains.annotations.NonNls;
@@@ -89,8 -94,13 +91,13 @@@ public class KeymapManagerImpl extends 
          setActiveKeymap(keymap);
        }
      }
 -    mySchemesManager.loadSchemes();
 +    mySchemeManager.loadSchemes();
  
+     ParameterizedRunnable<KeymapManager> runnable = WelcomeWizardUtil.getWizardCreateKeymapRunnable();
+     if (runnable != null) {
+       runnable.run(this);
+     }
      //noinspection AssignmentToStaticFieldFromInstanceMethod
      ourKeymapManagerInitialized = true;
    }