use of com.intellij.psi.SdkResolveScopeProvider in project intellij-community by JetBrains.
the class LibraryScopeCache method getScopeForSdk.
@NotNull
public GlobalSearchScope getScopeForSdk(@NotNull JdkOrderEntry jdkOrderEntry) {
final String jdkName = jdkOrderEntry.getJdkName();
if (jdkName == null)
return GlobalSearchScope.allScope(myProject);
GlobalSearchScope scope = mySdkScopes.get(jdkName);
if (scope == null) {
//noinspection deprecation
for (SdkResolveScopeProvider provider : SdkResolveScopeProvider.EP_NAME.getExtensions()) {
scope = provider.getScope(myProject, jdkOrderEntry);
if (scope != null) {
break;
}
}
if (scope == null) {
scope = new JdkScope(myProject, jdkOrderEntry);
}
return ConcurrencyUtil.cacheOrGet(mySdkScopes, jdkName, scope);
}
return scope;
}
Aggregations