mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-25332 spring: also recognize classes with scope != compile
This commit is contained in:
@@ -111,7 +111,8 @@ public class PsiClassConverter extends Converter<PsiClass> implements CustomRefe
|
||||
VirtualFile virtualFile = file.getVirtualFile();
|
||||
if (virtualFile == null) return null;
|
||||
ProjectFileIndex fileIndex = ProjectRootManager.getInstance(file.getProject()).getFileIndex();
|
||||
return GlobalSearchScope.moduleRuntimeScope(module, fileIndex.isInTestSourceContent(virtualFile));
|
||||
boolean tests = fileIndex.isInTestSourceContent(virtualFile);
|
||||
return module.getModuleRuntimeScope(tests).union(module.getModuleWithDependenciesAndLibrariesScope(tests));
|
||||
}
|
||||
|
||||
public static class AnnotationType extends PsiClassConverter {
|
||||
|
||||
@@ -50,7 +50,8 @@ public class DomJavaUtil {
|
||||
}
|
||||
else {
|
||||
ProjectFileIndex fileIndex = ProjectRootManager.getInstance(file.getProject()).getFileIndex();
|
||||
scope = GlobalSearchScope.moduleRuntimeScope(module, fileIndex.isInTestSourceContent(virtualFile));
|
||||
boolean tests = fileIndex.isInTestSourceContent(virtualFile);
|
||||
scope = module.getModuleRuntimeScope(tests).union(module.getModuleWithDependenciesAndLibrariesScope(tests));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -63,6 +63,6 @@ public abstract class ClassValueConverter extends Converter<PsiClass> implements
|
||||
}
|
||||
final boolean inTests = ProjectRootManager.getInstance(project).getFileIndex().isInTestSourceContent(file);
|
||||
|
||||
return module.getModuleRuntimeScope(inTests);
|
||||
return module.getModuleRuntimeScope(inTests).union(module.getModuleWithDependenciesAndLibrariesScope(inTests));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user