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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user