diff --git a/java/execution/impl/src/com/intellij/execution/actions/JavaRerunFailedTestsAction.java b/java/execution/impl/src/com/intellij/execution/actions/JavaRerunFailedTestsAction.java index dcabedf4ca91..6896dcdbea1f 100644 --- a/java/execution/impl/src/com/intellij/execution/actions/JavaRerunFailedTestsAction.java +++ b/java/execution/impl/src/com/intellij/execution/actions/JavaRerunFailedTestsAction.java @@ -39,9 +39,4 @@ public class JavaRerunFailedTestsAction extends AbstractRerunFailedTestsAction { protected Filter getFilter(@NotNull Project project, @NotNull GlobalSearchScope searchScope) { return super.getFilter(project, searchScope).and(JavaAwareFilter.METHOD(project, searchScope)); } - - @Override - public boolean isDumbAware() { - return false; - } } diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/SMTestRunnerConnectionUtil.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/SMTestRunnerConnectionUtil.java index 6775dc34f4c8..2dc2c60f1ca1 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/SMTestRunnerConnectionUtil.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/SMTestRunnerConnectionUtil.java @@ -257,7 +257,7 @@ public class SMTestRunnerConnectionUtil { if (URLUtil.FILE_PROTOCOL.equals(protocol)) { return FileUrlProvider.INSTANCE.getLocation(protocol, path, project, scope); } - else if (!DumbService.isDumb(project) || DumbService.isDumbAware(myLocator)) { + else if (!DumbService.isDumb(project) || DumbService.isDumbAware(myLocator) || Registry.is("dumb.aware.run.configurations")) { return myLocator.getLocation(protocol, path, project, scope); } else { diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java index 9009272f4e03..634f0e0a1475 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/SMTestProxy.java @@ -31,6 +31,7 @@ import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.PossiblyDumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Key; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.pom.Navigatable; @@ -263,10 +264,16 @@ public class SMTestProxy extends AbstractTestProxy { String protocolId = VirtualFileManager.extractProtocol(locationUrl); if (protocolId != null) { String path = VirtualFileManager.extractPath(locationUrl); - if (!DumbService.isDumb(project) || DumbService.isDumbAware(myLocator)) { - List locations = myLocator.getLocation(protocolId, path, project, searchScope); - if (!locations.isEmpty()) { - return locations.get(0); + if (!DumbService.isDumb(project) || DumbService.isDumbAware(myLocator) || Registry.is("dumb.aware.run.configurations")) { + try { + DumbService.getInstance(project).setAlternativeResolveEnabled(true); + List locations = myLocator.getLocation(protocolId, path, project, searchScope); + if (!locations.isEmpty()) { + return locations.get(0); + } + } + finally { + DumbService.getInstance(project).setAlternativeResolveEnabled(false); } } }