Set<Sdk> () { Set<Sdk> sdks = new HashSet<>(); for (Module m : ModuleManager.getInstance(myProject).getModules()) { Sdk sdk = ModuleRootManager.getInstance(m).getSdk(); if (sdk != null) { sdks.add(sdk); } } return sdks; }