The existing workspace import preference, antJdk, now controls both Ant and
newly imported Java projects. It stores Eclipse’s composite VM identifier, not
only a Java version or filesystem path, so installations with the same Java
version remain distinguishable. An empty selection uses the workspace default
JDK. JDKs must be registered under Java > Installed JREs and contain javac.
Each newly imported Java project gets:
release file as a
fallback for VM types that do not expose a version.JDK/version validation runs in a background Job. A confirmation question then runs on the display thread:
Listeners are removed and pending work is cancelled when the importer bundle stops. Superseded preparation callbacks do not display stale questions.
Imports and confirmed updates share a reentrant operation lock. The update Job waits for imports before acquiring its workspace scheduling rule; it does not hold the workspace rule while waiting for Ant or child Smart Import Jobs. This prevents deadlocks and ensures a confirmed change during import is applied after project creation completes. Already applied project changes are not rolled back if a later project fails or the operation is cancelled.
Headless Equinox tests cover the original wrong-runtime/global-Java-8 regressions, captured Ant/importer selection, the actual post-Smart-Import configuration seam, runtime metadata, workspace/default preservation, closed/non-Java projects, unchanged preference events and cancellation. Smart Import itself requires an Eclipse workbench and cannot run in the headless test container. GUI acceptance should confirm the Yes/No popup under the import preference page and inspect Java Build Path > Libraries plus Java Compiler on imported projects.