From 76a886eef5dde6bb6be8a77f8b177424b6b1cee0 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 28 May 2015 15:22:46 +0200 Subject: [PATCH] no resolve-based Show VCS History for Selection in dumb mode (EA-68875 - INRE: FileBasedIndexImpl.handleDumbMode) --- .../src/com/intellij/vcsUtil/VcsSelectionUtil.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/VcsSelectionUtil.java b/platform/vcs-api/src/com/intellij/vcsUtil/VcsSelectionUtil.java index 88c5631c50f0..136178faf2b3 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/VcsSelectionUtil.java +++ b/platform/vcs-api/src/com/intellij/vcsUtil/VcsSelectionUtil.java @@ -18,6 +18,7 @@ package com.intellij.vcsUtil; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.SelectionModel; import com.intellij.openapi.extensions.Extensions; +import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.vcs.actions.VcsContext; import org.jetbrains.annotations.Nullable; @@ -35,10 +36,13 @@ public class VcsSelectionUtil { if (selectionFromEditor != null) { return selectionFromEditor; } - final VcsSelectionProvider[] providers = Extensions.getExtensions(VcsSelectionProvider.EP_NAME); - for(VcsSelectionProvider provider: providers) { - final VcsSelection vcsSelection = provider.getSelection(context); - if (vcsSelection != null) return vcsSelection; + for(VcsSelectionProvider provider: Extensions.getExtensions(VcsSelectionProvider.EP_NAME)) { + try { + final VcsSelection vcsSelection = provider.getSelection(context); + if (vcsSelection != null) return vcsSelection; + } + catch (IndexNotReadyException ignored) { + } } return null; }