/*
 * Copyright 2000-2015 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.openapi.vcs.checkout;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.vcs.CheckoutProvider;
import com.intellij.openapi.vcs.ProjectLevelVcsManager;

public class CheckoutAction extends AnAction implements DumbAware {
  private final CheckoutProvider myProvider;

  public CheckoutAction(final CheckoutProvider provider) {
    super(provider.getVcsName());
    myProvider = provider;
  }

  public void actionPerformed(AnActionEvent e) {
    Project project = e.getData(CommonDataKeys.PROJECT);
    project = (project == null) ? ProjectManager.getInstance().getDefaultProject() : project;
    myProvider.doCheckout(project, getListener(project));
  }

  protected CheckoutProvider.Listener getListener(Project project) {
    return ProjectLevelVcsManager.getInstance(project).getCompositeCheckoutListener();
  }
}

@@ -842,114 +842,9 @@
 ect.
-DumbAware;%0Aimport com.intellij.openapi.project.Project;%0Aimport com.intellij.openapi.project.ProjectManager
+*
 ;%0Aim
@@ -1217,16 +1217,22 @@
 rformed(
+final 
 AnAction
@@ -1238,24 +1238,172 @@
 nEvent e) %7B%0A
+    DumbService.allowStartingDumbModeInside(DumbModePermission.MAY_START_BACKGROUND, new Runnable() %7B%0A      @Override%0A      public void run() %7B%0A    
     Project 
@@ -1451,16 +1451,20 @@
 T);%0A    
+  
+  
 project 
@@ -1545,16 +1545,20 @@
 roject;%0A
+    
     myPr
@@ -1607,16 +1607,32 @@
 ject));%0A
+      %7D%0A    %7D);%0A
   %7D%0A%0A  p

allow bg dumb mode inside CheckoutAction (EA-75341 - Throwable: DumbServiceImpl.scheduleCacheUpdate)