Make old js project compilable without modifications

This commit is contained in:
Nikolay Krasko
2013-03-18 15:03:42 +04:00
parent 1fdc9908dc
commit 29880fc79d
2 changed files with 10 additions and 2 deletions
@@ -51,8 +51,7 @@ public class JSLibraryStdPresentationProvider extends CachingLibraryPresentation
return null;
}
if (classesRoots.isEmpty()) {
// TODO: Deprecated - remove after some iterations
if (isOldJSStandardLibrary(classesRoots)) {
return new LibraryVersionProperties(null);
}
@@ -65,4 +64,9 @@ public class JSLibraryStdPresentationProvider extends CachingLibraryPresentation
return null;
}
// TODO: Deprecated - remove after some iterations
static boolean isOldJSStandardLibrary(@NotNull List<VirtualFile> classesRoots) {
return classesRoots.isEmpty();
}
}
@@ -55,6 +55,10 @@ public class JsHeaderLibraryPresentationProvider extends CachingLibraryPresentat
return null;
}
if (JSLibraryStdPresentationProvider.isOldJSStandardLibrary(classesRoots)) {
return new LibraryVersionProperties(null);
}
for (VirtualFile file : classesRoots) {
CommonProcessors.FindFirstProcessor<VirtualFile> findKTProcessor = new CommonProcessors.FindFirstProcessor<VirtualFile>() {
@Override