public JetTypeJetSignatureReader(
     JavaSemanticServices javaSemanticServices,
     JetStandardLibrary jetStandardLibrary,
     TypeVariableResolver typeVariableResolver) {
   this.javaSemanticServices = javaSemanticServices;
   this.javaDescriptorResolver = javaSemanticServices.getDescriptorResolver();
   this.jetStandardLibrary = jetStandardLibrary;
   this.typeVariableResolver = typeVariableResolver;
 }
 @Override
 public void extendNamespaceScope(
     @NotNull BindingTrace trace,
     @NotNull NamespaceDescriptor namespaceDescriptor,
     @NotNull WritableScope namespaceMemberScope) {
   namespaceMemberScope.importScope(
       javaSemanticServices
           .getDescriptorResolver()
           .createJavaPackageScope(
               DescriptorUtils.getFQName(namespaceDescriptor).toSafe(), namespaceDescriptor));
   delegateConfiguration.extendNamespaceScope(trace, namespaceDescriptor, namespaceMemberScope);
 }
Example #3
0
 private static PsiClass getPiClass(FqName packageFQN, JavaSemanticServices semanticServices) {
   // TODO: move this check outside
   // If this package is actually a Kotlin namespace, then we access it through a namespace
   // descriptor, and
   // Kotlin functions are already there
   NamespaceDescriptor kotlinNamespaceDescriptor =
       semanticServices.getKotlinNamespaceDescriptor(packageFQN);
   if (kotlinNamespaceDescriptor != null) {
     return null;
   } else {
     // TODO: what is GlobalSearchScope
     return semanticServices
         .getDescriptorResolver()
         .javaFacade
         .findClass(getQualifiedName(packageFQN, JvmAbi.PACKAGE_CLASS).getFqName());
   }
 }