From c80c25da85a1c8e7e45012dfdb1ae13ba58a3235 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 13 Jan 2014 18:03:04 +0100 Subject: [PATCH] save only custom path --- .../intellij/ide/browsers/WebBrowserManager.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java b/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java index 8d9d4e269a17..a66841ce2023 100644 --- a/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java +++ b/xml/impl/src/com/intellij/ide/browsers/WebBrowserManager.java @@ -70,9 +70,12 @@ public class WebBrowserManager implements PersistentStateComponent, Mod entry.setAttribute("id", browser.getId().toString()); entry.setAttribute("name", browser.getName()); entry.setAttribute("family", browser.getFamily().name()); - if (!StringUtil.isEmpty(browser.getPath())) { - entry.setAttribute("path", browser.getPath()); + + String path = browser.getPath(); + if (path != null && !path.equals(browser.getFamily().getExecutionPath())) { + entry.setAttribute("path", path); } + if (!browser.isActive()) { entry.setAttribute("active", "false"); } @@ -178,10 +181,16 @@ public class WebBrowserManager implements PersistentStateComponent, Mod } 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()), - StringUtil.nullize(child.getAttributeValue("path"), true), + path, activeValue == null || Boolean.parseBoolean(activeValue), specificSettings)); }