Search in sources :

Example 1 with CheckoutProviderEx

use of com.intellij.openapi.vcs.CheckoutProviderEx in project intellij-community by JetBrains.

the class JBProtocolCheckoutCommand method perform.

@Override
public void perform(String vcsId, Map<String, String> parameters) {
    String repository = parameters.get(REPOSITORY_NAME_KEY);
    if (StringUtil.isEmpty(repository)) {
        return;
    }
    for (CheckoutProvider provider : CheckoutProvider.EXTENSION_POINT_NAME.getExtensions()) {
        if (provider instanceof CheckoutProviderEx) {
            CheckoutProviderEx providerEx = (CheckoutProviderEx) provider;
            if (providerEx.getVcsId().equals(vcsId)) {
                Project project = ProjectManager.getInstance().getDefaultProject();
                CheckoutProvider.Listener listener = ProjectLevelVcsManager.getInstance(project).getCompositeCheckoutListener();
                AppIcon.getInstance().requestAttention(null, true);
                providerEx.doCheckout(project, listener, repository);
                break;
            }
        }
    }
}
Also used : CheckoutProvider(com.intellij.openapi.vcs.CheckoutProvider) Project(com.intellij.openapi.project.Project) CheckoutProviderEx(com.intellij.openapi.vcs.CheckoutProviderEx)

Aggregations

Project (com.intellij.openapi.project.Project)1 CheckoutProvider (com.intellij.openapi.vcs.CheckoutProvider)1 CheckoutProviderEx (com.intellij.openapi.vcs.CheckoutProviderEx)1