Don't detect library as js standard library if it can be detected as java runtime
This commit is contained in:
@@ -46,6 +46,11 @@ public class JSLibraryStdPresentationProvider extends CachingLibraryPresentation
|
||||
@Nullable
|
||||
@Override
|
||||
public LibraryVersionProperties detect(@NotNull List<VirtualFile> classesRoots) {
|
||||
if (JavaRuntimePresentationProvider.getInstance().detect(classesRoots) != null) {
|
||||
// Prevent clashing with java runtime, in case when library collects all roots.
|
||||
return null;
|
||||
}
|
||||
|
||||
if (classesRoots.isEmpty()) {
|
||||
// TODO: Deprecated - remove after some iterations
|
||||
return new LibraryVersionProperties(null);
|
||||
|
||||
Reference in New Issue
Block a user