Implemeted action for uploading Wikipedia articles (thanks to D.Wunsch)
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / internal / ConfigurationManager.java
index 034bb14..60e0b16 100644 (file)
@@ -33,7 +33,7 @@ public class ConfigurationManager {
        protected List configurations;
        protected Map threads = new HashMap();
        
-       protected List monitorListeners = new ArrayList();
+       protected List configurationListeners = new ArrayList();
        
        private Preferences.IPropertyChangeListener pcl;
        protected boolean ignorePreferenceChanges = false;
@@ -103,7 +103,7 @@ public class ConfigurationManager {
         * @param listener
         */
        public void addConfigurationListener(IConfigurationListener listener) {
-               monitorListeners.add(listener);
+               configurationListeners.add(listener);
        }
 
        /**
@@ -112,7 +112,7 @@ public class ConfigurationManager {
         * @param listener
         */
        public void removeConfigurationListener(IConfigurationListener listener) {
-               monitorListeners.remove(listener);
+               configurationListeners.remove(listener);
        }
        
        /**
@@ -120,18 +120,18 @@ public class ConfigurationManager {
         * @param rr
         * @param fType
         */
-       protected void fireConfigurationEvent(IConfiguration monitor, int type) {
-               Object[] obj = monitorListeners.toArray();
+       protected void fireConfigurationEvent(IConfiguration configuration, int type) {
+               Object[] obj = configurationListeners.toArray();
                
                int size = obj.length;
                for (int i = 0; i < size; i++) {
                        IConfigurationListener listener = (IConfigurationListener) obj[i];
                        if (type == ADD)
-                               listener.monitorAdded(monitor);
+                               listener.configurationAdded(configuration);
                        else if (type == CHANGE)
-                               listener.monitorChanged(monitor);
+                               listener.configurationChanged(configuration);
                        else if (type == REMOVE)
-                               listener.monitorRemoved(monitor);
+                               listener.configurationRemoved(configuration);
                }
        }
        
@@ -143,7 +143,7 @@ public class ConfigurationManager {
                
                configurations = new ArrayList();
                Preferences prefs = WikiEditorPlugin.getDefault().getPluginPreferences();
-               String xmlString = prefs.getString("configurations");
+               String xmlString = prefs.getString(WikiEditorPlugin.PREF_STRING_CONFIGURATIONS);
                if (xmlString != null && xmlString.length() > 0) {
                        try {
                                ByteArrayInputStream in = new ByteArrayInputStream(xmlString.getBytes());
@@ -153,9 +153,9 @@ public class ConfigurationManager {
                                if (children != null) {
                                        int size = children.length;
                                        for (int i = 0; i < size; i++) {
-                                               Configuration monitor = new Configuration();
-                                               monitor.load(children[i]);
-                                               configurations.add(monitor);
+                                               Configuration configuration = new ConfigurationWorkingCopy();
+                                               configuration.load(children[i]);
+                                               configurations.add(configuration);
                                        }
                                }
                        } catch (Exception e) {