mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90945 Display balloon notifications - option does not persist after restart
This commit is contained in:
+9
@@ -40,6 +40,7 @@ import java.util.*;
|
||||
public class NotificationsConfigurationImpl extends NotificationsConfiguration implements ApplicationComponent,
|
||||
PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.notification.impl.NotificationsConfiguration");
|
||||
private static final String SHOW_BALLOONS_ATTRIBUTE = "showBalloons";
|
||||
|
||||
private final Map<String, NotificationSettings> myIdToSettingsMap = new LinkedHashMap<String, NotificationSettings>();
|
||||
private final Map<String, String> myToolWindowCapable = new java.util.LinkedHashMap<String, String>();
|
||||
@@ -164,6 +165,10 @@ public class NotificationsConfigurationImpl extends NotificationsConfiguration i
|
||||
for (String entry: myToolWindowCapable.keySet()) {
|
||||
element.addContent(new Element("toolWindow").setAttribute("group", entry));
|
||||
}
|
||||
//noinspection NonPrivateFieldAccessedInSynchronizedContext
|
||||
if (!SHOW_BALLOONS) {
|
||||
element.setAttribute(SHOW_BALLOONS_ATTRIBUTE, "false");
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
@@ -185,5 +190,9 @@ public class NotificationsConfigurationImpl extends NotificationsConfiguration i
|
||||
}
|
||||
}
|
||||
_remove("Log Only");
|
||||
if ("false".equals(state.getAttributeValue(SHOW_BALLOONS_ATTRIBUTE))) {
|
||||
//noinspection NonPrivateFieldAccessedInSynchronizedContext
|
||||
SHOW_BALLOONS = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user