void () { final String profilesIniPath = myProfilesIniPathField.getText(); if (myLastProfilesIniPath != null && myLastProfilesIniPath.equals(profilesIniPath)) { return; } myProfileCombobox.removeAllItems(); final List<FirefoxProfile> profiles = FirefoxUtil.computeProfiles(new File(profilesIniPath)); final FirefoxProfile defaultProfile = FirefoxUtil.getDefaultProfile(profiles); this.defaultProfile = defaultProfile != null ? defaultProfile.getName() : null; for (FirefoxProfile profile : profiles) { //noinspection unchecked myProfileCombobox.addItem(profile.getName()); } if (!profiles.isEmpty()) { myProfileCombobox.setSelectedIndex(0); } myLastProfilesIniPath = profilesIniPath; }