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); } }