Make old js project compilable without modifications
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user