From: acolyer Date: Fri, 9 May 2003 09:21:08 +0000 (+0000) Subject: Added persist member. X-Git-Tag: V1_1_0_RC2~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d74d7bfa222e384f4fad1f01d5ea27f209677fea;p=aspectj.git Added persist member. --- diff --git a/ajde/src/org/aspectj/ajde/ui/internal/UserPreferencesStore.java b/ajde/src/org/aspectj/ajde/ui/internal/UserPreferencesStore.java index 722e18577..f6ca2d439 100644 --- a/ajde/src/org/aspectj/ajde/ui/internal/UserPreferencesStore.java +++ b/ajde/src/org/aspectj/ajde/ui/internal/UserPreferencesStore.java @@ -33,13 +33,15 @@ public class UserPreferencesStore implements UserPreferencesAdapter { public static final String FILE_NAME = "/.ajbrowser"; private final String VALUE_SEP = ";"; private Properties properties = new Properties(); + private boolean persist = true; public UserPreferencesStore() { this(true); } public UserPreferencesStore(boolean loadDefault) { - if (loadDefault) { + persist = loadDefault; + if (persist) { loadProperties(getPropertiesFilePath()); } } @@ -123,6 +125,8 @@ public class UserPreferencesStore implements UserPreferencesAdapter { } } public void saveProperties() { + if (!persist) return; + FileOutputStream out = null; String path = null; try {