new compiler mode: stdlib

include jdk-headers, do not include runtime
This commit is contained in:
Stepan Koltsov
2012-04-08 02:08:27 +04:00
parent 0f166acf5d
commit f16895ba65
5 changed files with 19 additions and 3 deletions
@@ -23,4 +23,10 @@ public enum CompilerSpecialMode {
REGULAR,
BUILTINS,
JDK_HEADERS,
STDLIB,
;
public boolean includeJdkHeaders() {
return this == REGULAR || this == STDLIB;
}
}
@@ -62,7 +62,7 @@ public class PsiClassFinderForJvm implements PsiClassFinder {
@PostConstruct
public void initialize() {
this.altClassFinder = new AltClassFinder(project,
compilerSpecialMode == CompilerSpecialMode.REGULAR ? PathUtil.getAltHeadersRoots() : Collections.<VirtualFile>emptyList());
compilerSpecialMode.includeJdkHeaders() ? PathUtil.getAltHeadersRoots() : Collections.<VirtualFile>emptyList());
this.javaSearchScope = new DelegatingGlobalSearchScope(GlobalSearchScope.allScope(project)) {
@Override
public boolean contains(VirtualFile file) {