[external system api][IJPL-158355] renamed ExternalModuleBuildGlobalSearchScope to GradleModuleBuildGlobalSearchScope

GitOrigin-RevId: be768f408f982272965dbd9153d0a737e139ab41
This commit is contained in:
Alexander.Glukhov
2024-07-19 13:26:39 +02:00
committed by intellij-monorepo-bot
parent 83b5930727
commit 5385950cd0
3 changed files with 9 additions and 9 deletions

View File

@@ -36,10 +36,10 @@ public final class GradleClassFinder extends NonClasspathClassFinder {
@NotNull
@Override
protected PackageDirectoryCache getCache(@Nullable GlobalSearchScope scope) {
if (scope instanceof ExternalModuleBuildGlobalSearchScope) {
if (scope instanceof GradleModuleBuildGlobalSearchScope) {
GradleBuildClasspathManager buildClasspathManager = GradleBuildClasspathManager.getInstance(myProject);
Map<String, PackageDirectoryCache> classFinderCache = buildClasspathManager.getClassFinderCache();
return classFinderCache.get(((ExternalModuleBuildGlobalSearchScope)scope).getExternalModulePath());
return classFinderCache.get(((GradleModuleBuildGlobalSearchScope)scope).getExternalModulePath());
}
return super.getCache(scope);
}
@@ -55,7 +55,7 @@ public final class GradleClassFinder extends NonClasspathClassFinder {
@Override
public PsiClass findClass(@NotNull String qualifiedName, @NotNull GlobalSearchScope scope) {
PsiClass aClass = super.findClass(qualifiedName, scope);
if (aClass == null || scope instanceof ExternalModuleBuildGlobalSearchScope || scope instanceof EverythingGlobalScope) {
if (aClass == null || scope instanceof GradleModuleBuildGlobalSearchScope || scope instanceof EverythingGlobalScope) {
return aClass;
}
@@ -68,6 +68,6 @@ public final class GradleClassFinder extends NonClasspathClassFinder {
@Override
public PsiPackage @NotNull [] getSubPackages(@NotNull PsiPackage psiPackage, @NotNull GlobalSearchScope scope) {
return scope instanceof ExternalModuleBuildGlobalSearchScope ? super.getSubPackages(psiPackage, scope) : PsiPackage.EMPTY_ARRAY;
return scope instanceof GradleModuleBuildGlobalSearchScope ? super.getSubPackages(psiPackage, scope) : PsiPackage.EMPTY_ARRAY;
}
}

View File

@@ -9,13 +9,13 @@ import org.jetbrains.annotations.NotNull;
/**
* @author Vladislav.Soroka
*/
public final class ExternalModuleBuildGlobalSearchScope extends DelegatingGlobalSearchScope {
public final class GradleModuleBuildGlobalSearchScope extends DelegatingGlobalSearchScope {
@NotNull
private final String externalModulePath;
public ExternalModuleBuildGlobalSearchScope(@NotNull Project project,
@NotNull GlobalSearchScope baseScope,
@NotNull String externalModulePath) {
public GradleModuleBuildGlobalSearchScope(@NotNull Project project,
@NotNull GlobalSearchScope baseScope,
@NotNull String externalModulePath) {
super(new DelegatingGlobalSearchScope(project, baseScope));
this.externalModulePath = externalModulePath;
}

View File

@@ -68,7 +68,7 @@ public final class GradleScriptType extends GroovyRunnableScriptType {
final Collection<VirtualFile> files = GradleBuildClasspathManager.getInstance(project).getModuleClasspathEntries(modulePath);
result = new ExternalModuleBuildGlobalSearchScope(project, result.uniteWith(new NonClasspathDirectoriesScope(files)), modulePath);
result = new GradleModuleBuildGlobalSearchScope(project, result.uniteWith(new NonClasspathDirectoriesScope(files)), modulePath);
return result;
}