}
public void resetEditorFrom(NginxRunConfiguration configuration) {
DefaultComboBoxModel model = (DefaultComboBoxModel) form.serverCombo.getModel();
model.removeAllElements();
NginxServersConfiguration servers = NginxServersConfiguration.getInstance();
for (NginxServerDescriptor descriptor : servers.getServersDescriptors()) {
model.addElement(descriptor);
}
String chosenDescriptorId = configuration.getServerDescriptorId();
if (chosenDescriptorId != null) {
NginxServersConfiguration serversConfig = NginxServersConfiguration.getInstance();
NginxServerDescriptor descriptor = serversConfig.getDescriptorById(chosenDescriptorId);
if (descriptor != null) {
model.setSelectedItem(descriptor);
} else {
model.setSelectedItem(null);
}