@@ -0,0 +1,2659 @@
+/*%0A * Copyright 2000-2014 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.intellij.ide.actions;%0A%0Aimport com.intellij.openapi.actionSystem.ActionManager;%0Aimport com.intellij.openapi.actionSystem.AnAction;%0Aimport com.intellij.openapi.actionSystem.AnActionEvent;%0Aimport com.intellij.openapi.actionSystem.impl.ActionManagerImpl;%0Aimport com.intellij.openapi.keymap.Keymap;%0Aimport com.intellij.openapi.keymap.ex.KeymapManagerEx;%0Aimport com.intellij.testFramework.PlatformTestCase;%0Aimport com.intellij.util.containers.HashSet;%0A%0Aimport java.lang.reflect.Method;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0Aimport java.util.Set;%0A%0A/**%0A * @author Konstantin Bulenkov%0A */%0Apublic class ActionsWithoutUpdateMethodTest extends PlatformTestCase %7B%0A  private final static List%3CString%3E PLATFORM_WIDE_ACTIONS = Arrays.asList(%0A    %22TestGestureAction%22,%0A    %22Synchronize%22,%0A    %22SaveAll%22,%0A    %22MaintenanceAction%22,%0A    %22ShowProjectStructureSettings%22%0A  );%0A%0A  public void testActionsWithShortcuts() throws Exception %7B%0A    Set%3CString%3E ids = new HashSet%3CString%3E();%0A    for (String id : ((ActionManagerImpl)ActionManager.getInstance()).getActionIds()) %7B%0A      for (Keymap keymap : KeymapManagerEx.getInstanceEx().getAllKeymaps()) %7B%0A        if (keymap.getShortcuts(id).length %3E 0 && !PLATFORM_WIDE_ACTIONS.contains(id)) %7B%0A          ids.add(id);%0A        %7D%0A      %7D%0A    %7D%0A%0A    ActionManager mgr = ActionManager.getInstance();%0A    ArrayList%3CAnAction%3E failed = new ArrayList%3CAnAction%3E();%0A    for (String id : ids) %7B%0A      AnAction action = mgr.getAction(id);%0A      if (action == null) %7B%0A        System.out.println(%22Can't find action: %22 + id);%0A        continue;%0A      %7D%0A      Method updateMethod = action.getClass().getMethod(%22update%22, AnActionEvent.class);%0A      if (updateMethod.getDeclaringClass() == AnAction.class) %7B%0A        failed.add(action);%0A      %7D%0A    %7D%0A    for (AnAction action : failed) %7B%0A      System.out.println(action + %22 ID: %22 + mgr.getId(action) + %22 Class: %22 + action.getClass());%0A    %7D%0A%0A    assert failed.size() == 0 : %22The following actions have shortcuts, but don't have update() method redefined%22;%0A  %7D%0A%7D%0A

move test to community and create a copy for ultimate tests