Pass GlobalSearchScope instance to JvmPackagePartProvider

Currently behavior is unchanged because the "all project" scope is passed,
however in the future this will allow to implement separate modules in the
compiler properly
This commit is contained in:
Alexander Udalov
2016-09-29 19:14:21 +03:00
parent 54dfe760c0
commit 3314725700
9 changed files with 43 additions and 26 deletions
@@ -283,12 +283,13 @@ public abstract class AbstractDiagnosticsTest extends BaseDiagnosticsTest {
// New JavaDescriptorResolver is created for each module, which is good because it emulates different Java libraries for each module,
// albeit with same class names
// See TopDownAnalyzerFacadeForJVM#analyzeFilesWithJavaIntegration
GlobalSearchScope moduleContentScope = GlobalSearchScope.allScope(moduleContext.getProject());
ComponentProvider container = InjectionKt.createContainerForTopDownSingleModuleAnalyzerForJvm(
moduleContext,
moduleTrace,
new FileBasedDeclarationProviderFactory(moduleContext.getStorageManager(), files),
GlobalSearchScope.allScope(moduleContext.getProject()),
new JvmPackagePartProvider(getEnvironment()),
moduleContentScope,
new JvmPackagePartProvider(getEnvironment(), moduleContentScope),
configuration.get(CommonConfigurationKeys.LANGUAGE_VERSION_SETTINGS, LanguageVersionSettingsImpl.DEFAULT)
);