void (@NotNull Element element) { try { String defaultValue = element.getAttributeValue("default"); if (!StringUtil.isEmpty(defaultValue)) { defaultBrowserPolicy = DefaultBrowserPolicy.valueOf(StringUtil.toUpperCase(defaultValue)); } String serverReload = element.getAttributeValue("serverReloadMode"); if (!StringUtil.isEmpty(serverReload)) { webServerReloadMode = ReloadMode.valueOf(StringUtil.toUpperCase(serverReload)); } String previewReload = element.getAttributeValue("previewReloadMode"); if (!StringUtil.isEmpty(previewReload)) { webPreviewReloadMode = ReloadMode.valueOf(StringUtil.toUpperCase(previewReload)); } } catch (IllegalArgumentException e) { LOG.warn(e); } showBrowserHover = !"false".equals(element.getAttributeValue("showHover")); showBrowserHoverXml = "true".equals(element.getAttributeValue("showHoverXml")); List<ConfigurableWebBrowser> list = new ArrayList<>(); for (Element child : element.getChildren("browser")) { BrowserFamily family = readFamily(child.getAttributeValue("family")); if (family == null) { continue; } UUID id = readId(child.getAttributeValue("id"), family, list); if (id == null || PREDEFINED_OLD_EDGE_ID.equals(id)) { continue; } Element settingsElement = child.getChild("settings"); BrowserSpecificSettings specificSettings = family.createBrowserSpecificSettings(); if (specificSettings != null && settingsElement != null) { try { XmlSerializer.deserializeInto(specificSettings, settingsElement); } catch (Exception e) { LOG.warn(e); } } String activeValue = child.getAttributeValue("active"); String path = StringUtil.nullize(child.getAttributeValue("path"), true); if (path == null) { path = family.getExecutionPath(); } list.add(new ConfigurableWebBrowser(id, family, StringUtil.notNullize(child.getAttributeValue("name"), family.getName()), path, activeValue == null || Boolean.parseBoolean(activeValue), specificSettings)); } // add removed/new predefined browsers Map<UUID, ConfigurableWebBrowser> idToBrowser = null; int n = list.size(); pb: for (UUID predefinedBrowserId : PREDEFINED_BROWSER_IDS) { for (int i = 0; i < n; i++) { if (list.get(i).getId().equals(predefinedBrowserId)) { continue pb; } } if (idToBrowser == null) { idToBrowser = ContainerUtil.newMapFromValues(getPredefinedBrowsers().iterator(), it -> it.getId()); } list.add(idToBrowser.get(predefinedBrowserId)); } setList(list); }