Make old js project compilable without modifications
This commit is contained in:
@@ -51,8 +51,7 @@ public class JSLibraryStdPresentationProvider extends CachingLibraryPresentation
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (classesRoots.isEmpty()) {
|
if (isOldJSStandardLibrary(classesRoots)) {
|
||||||
// TODO: Deprecated - remove after some iterations
|
|
||||||
return new LibraryVersionProperties(null);
|
return new LibraryVersionProperties(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,4 +64,9 @@ public class JSLibraryStdPresentationProvider extends CachingLibraryPresentation
|
|||||||
|
|
||||||
return null;
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (JSLibraryStdPresentationProvider.isOldJSStandardLibrary(classesRoots)) {
|
||||||
|
return new LibraryVersionProperties(null);
|
||||||
|
}
|
||||||
|
|
||||||
for (VirtualFile file : classesRoots) {
|
for (VirtualFile file : classesRoots) {
|
||||||
CommonProcessors.FindFirstProcessor<VirtualFile> findKTProcessor = new CommonProcessors.FindFirstProcessor<VirtualFile>() {
|
CommonProcessors.FindFirstProcessor<VirtualFile> findKTProcessor = new CommonProcessors.FindFirstProcessor<VirtualFile>() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user