1) Fixed another static:: issue.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / preferences / OverlayPreferenceStore.java
index 917e813..f29b683 100644 (file)
@@ -8,7 +8,7 @@ package net.sourceforge.phpeclipse.preferences;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceStore;
 import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
+//import org.eclipse.jface.util.PropertyChangeEvent;
 
 /**
  * An overlaying preference store.
@@ -44,17 +44,17 @@ public class OverlayPreferenceStore implements IPreferenceStore {
                }
        };
 
-       private class PropertyListener implements IPropertyChangeListener {
-
-               /*
-                * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
-                */
-               public void propertyChange(PropertyChangeEvent event) {
-                       OverlayKey key = findOverlayKey(event.getProperty());
-                       if (key != null)
-                               propagateProperty(fParent, key, fStore);
-               }
-       };
+//     private class PropertyListener implements IPropertyChangeListener {
+//
+//             /*
+//              * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent)
+//              */
+//             public void propertyChange(PropertyChangeEvent event) {
+//                     OverlayKey key = findOverlayKey(event.getProperty());
+//                     if (key != null)
+//                             propagateProperty(fParent, key, fStore);
+//             }
+//     };
 
        private IPreferenceStore fParent;
 
@@ -62,7 +62,7 @@ public class OverlayPreferenceStore implements IPreferenceStore {
 
        private OverlayKey[] fOverlayKeys;
 
-       private PropertyListener fPropertyListener;
+       //private PropertyListener fPropertyListener;
 
        public OverlayPreferenceStore(IPreferenceStore parent,
                        OverlayKey[] overlayKeys) {
@@ -83,66 +83,66 @@ public class OverlayPreferenceStore implements IPreferenceStore {
                return (findOverlayKey(key) != null);
        }
 
-       private void propagateProperty(IPreferenceStore orgin, OverlayKey key,
-                       IPreferenceStore target) {
-
-               if (orgin.isDefault(key.fKey)) {
-                       if (!target.isDefault(key.fKey))
-                               target.setToDefault(key.fKey);
-                       return;
-               }
-
-               TypeDescriptor d = key.fDescriptor;
-               if (BOOLEAN == d) {
-
-                       boolean originValue = orgin.getBoolean(key.fKey);
-                       boolean targetValue = target.getBoolean(key.fKey);
-                       if (targetValue != originValue)
-                               target.setValue(key.fKey, originValue);
-
-               } else if (DOUBLE == d) {
-
-                       double originValue = orgin.getDouble(key.fKey);
-                       double targetValue = target.getDouble(key.fKey);
-                       if (targetValue != originValue)
-                               target.setValue(key.fKey, originValue);
-
-               } else if (FLOAT == d) {
-
-                       float originValue = orgin.getFloat(key.fKey);
-                       float targetValue = target.getFloat(key.fKey);
-                       if (targetValue != originValue)
-                               target.setValue(key.fKey, originValue);
-
-               } else if (INT == d) {
-
-                       int originValue = orgin.getInt(key.fKey);
-                       int targetValue = target.getInt(key.fKey);
-                       if (targetValue != originValue)
-                               target.setValue(key.fKey, originValue);
-
-               } else if (LONG == d) {
-
-                       long originValue = orgin.getLong(key.fKey);
-                       long targetValue = target.getLong(key.fKey);
-                       if (targetValue != originValue)
-                               target.setValue(key.fKey, originValue);
-
-               } else if (STRING == d) {
-
-                       String originValue = orgin.getString(key.fKey);
-                       String targetValue = target.getString(key.fKey);
-                       if (targetValue != null && originValue != null
-                                       && !targetValue.equals(originValue))
-                               target.setValue(key.fKey, originValue);
-
-               }
-       }
-
-       public void propagate() {
-               for (int i = 0; i < fOverlayKeys.length; i++)
-                       propagateProperty(fStore, fOverlayKeys[i], fParent);
-       }
+//     private void propagateProperty(IPreferenceStore orgin, OverlayKey key,
+//                     IPreferenceStore target) {
+//
+//             if (orgin.isDefault(key.fKey)) {
+//                     if (!target.isDefault(key.fKey))
+//                             target.setToDefault(key.fKey);
+//                     return;
+//             }
+//
+//             TypeDescriptor d = key.fDescriptor;
+//             if (BOOLEAN == d) {
+//
+//                     boolean originValue = orgin.getBoolean(key.fKey);
+//                     boolean targetValue = target.getBoolean(key.fKey);
+//                     if (targetValue != originValue)
+//                             target.setValue(key.fKey, originValue);
+//
+//             } else if (DOUBLE == d) {
+//
+//                     double originValue = orgin.getDouble(key.fKey);
+//                     double targetValue = target.getDouble(key.fKey);
+//                     if (targetValue != originValue)
+//                             target.setValue(key.fKey, originValue);
+//
+//             } else if (FLOAT == d) {
+//
+//                     float originValue = orgin.getFloat(key.fKey);
+//                     float targetValue = target.getFloat(key.fKey);
+//                     if (targetValue != originValue)
+//                             target.setValue(key.fKey, originValue);
+//
+//             } else if (INT == d) {
+//
+//                     int originValue = orgin.getInt(key.fKey);
+//                     int targetValue = target.getInt(key.fKey);
+//                     if (targetValue != originValue)
+//                             target.setValue(key.fKey, originValue);
+//
+//             } else if (LONG == d) {
+//
+//                     long originValue = orgin.getLong(key.fKey);
+//                     long targetValue = target.getLong(key.fKey);
+//                     if (targetValue != originValue)
+//                             target.setValue(key.fKey, originValue);
+//
+//             } else if (STRING == d) {
+//
+//                     String originValue = orgin.getString(key.fKey);
+//                     String targetValue = target.getString(key.fKey);
+//                     if (targetValue != null && originValue != null
+//                                     && !targetValue.equals(originValue))
+//                             target.setValue(key.fKey, originValue);
+//
+//             }
+//     }
+
+//     public void propagate() {
+//             for (int i = 0; i < fOverlayKeys.length; i++)
+//                     propagateProperty(fStore, fOverlayKeys[i], fParent);
+//     }
 
        private void loadProperty(IPreferenceStore orgin, OverlayKey key,
                        IPreferenceStore target, boolean forceInitialization) {
@@ -197,24 +197,24 @@ public class OverlayPreferenceStore implements IPreferenceStore {
                        loadProperty(fParent, fOverlayKeys[i], fStore, true);
        }
 
-       public void loadDefaults() {
-               for (int i = 0; i < fOverlayKeys.length; i++)
-                       setToDefault(fOverlayKeys[i].fKey);
-       }
-
-       public void start() {
-               if (fPropertyListener == null) {
-                       fPropertyListener = new PropertyListener();
-                       fParent.addPropertyChangeListener(fPropertyListener);
-               }
-       }
-
-       public void stop() {
-               if (fPropertyListener != null) {
-                       fParent.removePropertyChangeListener(fPropertyListener);
-                       fPropertyListener = null;
-               }
-       }
+//     public void loadDefaults() {
+//             for (int i = 0; i < fOverlayKeys.length; i++)
+//                     setToDefault(fOverlayKeys[i].fKey);
+//     }
+
+//     public void start() {
+//             if (fPropertyListener == null) {
+//                     fPropertyListener = new PropertyListener();
+//                     fParent.addPropertyChangeListener(fPropertyListener);
+//             }
+//     }
+
+//     public void stop() {
+//             if (fPropertyListener != null) {
+//                     fParent.removePropertyChangeListener(fPropertyListener);
+//                     fPropertyListener = null;
+//             }
+//     }
 
        /*
         * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)