Prepare infrastruct for fixing customized script resolving

Move ConfigManager and ClassFinder to the idea-analysis
 Add (back) IndexableSetContributor
 Add a method in ConfigManager to generate all dependencies scope
 Add and use delegating scope with possibility to get base scope from it (used in the class finder)
This commit is contained in:
Ilya Chernikov
2016-04-28 15:39:57 +02:00
parent 3e17724e58
commit 5c37017484
5 changed files with 59 additions and 5 deletions
@@ -61,9 +61,20 @@ public class JavaClassFinderImpl implements JavaClassFinder {
// Only activate post create
}
public class DelegatingGlobalSearchScopeWithBaseAccess extends DelegatingGlobalSearchScope {
public DelegatingGlobalSearchScopeWithBaseAccess(@NotNull GlobalSearchScope baseScope) {
super(baseScope);
}
public GlobalSearchScope getBase() {
return myBaseScope;
}
}
@PostConstruct
public void initialize() {
javaSearchScope = new DelegatingGlobalSearchScope(baseScope) {
javaSearchScope = new DelegatingGlobalSearchScopeWithBaseAccess(baseScope) {
@Override
public boolean contains(@NotNull VirtualFile file) {
return myBaseScope.contains(file) && (file.isDirectory() || file.getFileType() != KotlinFileType.INSTANCE);