X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/MockupPreferenceStore.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/MockupPreferenceStore.java index 9ebfdcb..bb54cd6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/MockupPreferenceStore.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/preferences/MockupPreferenceStore.java @@ -17,11 +17,11 @@ import org.eclipse.jface.util.ListenerList; import org.eclipse.jface.util.PropertyChangeEvent; /** - * Mockup preference store, for registering listeners and firing events, - * without being an actual store. + * Mockup preference store, for registering listeners and firing events, without + * being an actual store. *

- * All methods except firing, adding and removing listeners throw - * an {@link java.lang.UnsupportedOperationException}. + * All methods except firing, adding and removing listeners throw an + * {@link java.lang.UnsupportedOperationException}. *

* * @since 3.0 @@ -29,7 +29,7 @@ import org.eclipse.jface.util.PropertyChangeEvent; public class MockupPreferenceStore implements IPreferenceStore { /** Listeners on this store */ - private ListenerList fListeners= new ListenerList(); + private ListenerList fListeners = new ListenerList(); /** * {@inheritDoc} @@ -55,22 +55,31 @@ public class MockupPreferenceStore implements IPreferenceStore { /** * {@inheritDoc} */ - public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) { + public void firePropertyChangeEvent(String name, Object oldValue, + Object newValue) { firePropertyChangeEvent(this, name, oldValue, newValue); } /** - * Fires a property change event with the given source, property name, old and new value. Used - * when the event source should be different from this mockup preference store. - * @param source The event source - * @param name The property name - * @param oldValue The property's old value - * @param newValue The property's new value - */ - public void firePropertyChangeEvent(Object source, String name, Object oldValue, Object newValue) { - PropertyChangeEvent event= new PropertyChangeEvent(source, name, oldValue, newValue); - Object[] listeners= fListeners.getListeners(); - for (int i= 0; i < listeners.length; i++) + * Fires a property change event with the given source, property name, old + * and new value. Used when the event source should be different from this + * mockup preference store. + * + * @param source + * The event source + * @param name + * The property name + * @param oldValue + * The property's old value + * @param newValue + * The property's new value + */ + public void firePropertyChangeEvent(Object source, String name, + Object oldValue, Object newValue) { + PropertyChangeEvent event = new PropertyChangeEvent(source, name, + oldValue, newValue); + Object[] listeners = fListeners.getListeners(); + for (int i = 0; i < listeners.length; i++) ((IPropertyChangeListener) listeners[i]).propertyChange(event); }