List<JreComboBoxItem> (boolean editable) { List<JreComboBoxItem> model = new ArrayList<>(); model.add(myDefaultJreItem); final Sdk[] allJDKs = ProjectJdkTable.getInstance().getAllJdks(); for (Sdk sdk : allJDKs) { model.add(new SdkAsJreItem(sdk)); } final Set<String> jrePaths = new HashSet<>(); for (JreProvider provider : JreProvider.EP_NAME.getExtensionList()) { if (provider.isAvailable()) { String path = provider.getJrePath(); if (!StringUtil.isEmpty(path)) { jrePaths.add(path); model.add(new CustomJreItem(provider)); } } } for (Sdk jdk : allJDKs) { String homePath = jdk.getHomePath(); if (!SystemInfo.isMac && jdk.getHomePath() != null) { Path path = Path.of(jdk.getHomePath(), "jre"); if (Files.isDirectory(path)) { homePath = path.toString(); } } if (jrePaths.add(homePath)) { model.add(new CustomJreItem(homePath, null, jdk.getVersionString())); } } if (!editable) { model.add(new AddJreItem()); } return model; }