From 4fcdbd552dd4975b228e682b4e982e576f2998c9 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Mon, 1 Feb 2016 18:30:16 +0300 Subject: [PATCH] Revert 6cb72ff --- plugins/groovy/src/META-INF/plugin.xml | 1 - .../console/GroovyBundledClassFinder.java | 51 ------------------- .../GroovyConsoleResolveScopeProvider.java | 14 +---- 3 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyBundledClassFinder.java diff --git a/plugins/groovy/src/META-INF/plugin.xml b/plugins/groovy/src/META-INF/plugin.xml index 244517146b31..6051655dedf6 100644 --- a/plugins/groovy/src/META-INF/plugin.xml +++ b/plugins/groovy/src/META-INF/plugin.xml @@ -576,7 +576,6 @@ - calcClassRoots() { - return getBundledGroovyJarRoots(); - } - - @NotNull - public static List getBundledGroovyJarRoots() { - final VirtualFile bundledJar = LocalFileSystem.getInstance().findFileByIoFile(GroovyFacetUtil.getBundledGroovyJar()); - if (bundledJar != null) { - final VirtualFile root = StandardFileSystems.getJarRootForLocalFile(bundledJar); - if (root != null) { - return Collections.singletonList(root); - } - } - return Collections.emptyList(); - } -} diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyConsoleResolveScopeProvider.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyConsoleResolveScopeProvider.java index 8544ea7e8c86..7d9d1fe16ca5 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyConsoleResolveScopeProvider.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyConsoleResolveScopeProvider.java @@ -20,12 +20,9 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.ResolveScopeProvider; import com.intellij.psi.search.GlobalSearchScope; -import com.intellij.psi.search.NonClasspathDirectoriesScope; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; - public class GroovyConsoleResolveScopeProvider extends ResolveScopeProvider { @Nullable @@ -33,15 +30,6 @@ public class GroovyConsoleResolveScopeProvider extends ResolveScopeProvider { public GlobalSearchScope getResolveScope(@NotNull VirtualFile file, Project project) { final GroovyConsoleStateService projectConsole = GroovyConsoleStateService.getInstance(project); final Module module = projectConsole.getSelectedModule(file); - if (module == null || module.isDisposed()) return null; - - final GlobalSearchScope moduleScope = GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module); - if (!GroovyConsoleUtil.hasGroovyAll(module)) { - final List bundledGroovyJarRoots = GroovyBundledClassFinder.getBundledGroovyJarRoots(); - if (!bundledGroovyJarRoots.isEmpty()) { - return new NonClasspathDirectoriesScope(bundledGroovyJarRoots).uniteWith(moduleScope); - } - } - return moduleScope; + return module == null || module.isDisposed() ? null : GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module); } }