A Rust project listed a JDK under External Libraries: jdk_groups treated a folder without a Java build manifest as Java whenever languages.java.jdk was set or Project Structure had source roots, and those come from the merged global and project settings, so a JDK chosen once globally marked every project as Java. A module without pom.xml / Gradle files now gets the JDK only when it is a Java module: .classpath / .project, a Java .idea project or JAVA_MODULE .iml, Project Structure libraries, or .java files in the folder or a source root (bounded walk that skips ignored and hidden folders). The configured JDK only picks which JDK is shown.
Closes#7639
Co-authored-by: wildcatDownstairs <[email protected]>