Class FlushingPreferenceStore

java.lang.Object
org.eclipse.handly.ui.preference.FlushingPreferenceStore
All Implemented Interfaces:
org.eclipse.jface.preference.IPreferenceStore

public class FlushingPreferenceStore extends Object implements org.eclipse.jface.preference.IPreferenceStore
A preference store that flushes the delegate after each write operation. If the delegate is not a persistent store, flushing will result in no-op. If there is a problem flushing the store, the write operation that caused the flush will still succeed and the error will be logged.
  • Constructor Details

    • FlushingPreferenceStore

      public FlushingPreferenceStore(org.eclipse.jface.preference.IPreferenceStore store)
      Creates a new preference store that will delegate to the given store, flushing it after each write operation.
      Parameters:
      store - the delegate preference store (not null)
  • Method Details

    • addPropertyChangeListener

      public void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
      Specified by:
      addPropertyChangeListener in interface org.eclipse.jface.preference.IPreferenceStore
    • contains

      public boolean contains(String name)
      Specified by:
      contains in interface org.eclipse.jface.preference.IPreferenceStore
    • firePropertyChangeEvent

      public void firePropertyChangeEvent(String name, Object oldValue, Object newValue)
      Specified by:
      firePropertyChangeEvent in interface org.eclipse.jface.preference.IPreferenceStore
    • getBoolean

      public boolean getBoolean(String name)
      Specified by:
      getBoolean in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultBoolean

      public boolean getDefaultBoolean(String name)
      Specified by:
      getDefaultBoolean in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultDouble

      public double getDefaultDouble(String name)
      Specified by:
      getDefaultDouble in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultFloat

      public float getDefaultFloat(String name)
      Specified by:
      getDefaultFloat in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultInt

      public int getDefaultInt(String name)
      Specified by:
      getDefaultInt in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultLong

      public long getDefaultLong(String name)
      Specified by:
      getDefaultLong in interface org.eclipse.jface.preference.IPreferenceStore
    • getDefaultString

      public String getDefaultString(String name)
      Specified by:
      getDefaultString in interface org.eclipse.jface.preference.IPreferenceStore
    • getDouble

      public double getDouble(String name)
      Specified by:
      getDouble in interface org.eclipse.jface.preference.IPreferenceStore
    • getFloat

      public float getFloat(String name)
      Specified by:
      getFloat in interface org.eclipse.jface.preference.IPreferenceStore
    • getInt

      public int getInt(String name)
      Specified by:
      getInt in interface org.eclipse.jface.preference.IPreferenceStore
    • getLong

      public long getLong(String name)
      Specified by:
      getLong in interface org.eclipse.jface.preference.IPreferenceStore
    • getString

      public String getString(String name)
      Specified by:
      getString in interface org.eclipse.jface.preference.IPreferenceStore
    • isDefault

      public boolean isDefault(String name)
      Specified by:
      isDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • needsSaving

      public boolean needsSaving()
      Specified by:
      needsSaving in interface org.eclipse.jface.preference.IPreferenceStore
    • putValue

      public void putValue(String name, String value)
      Specified by:
      putValue in interface org.eclipse.jface.preference.IPreferenceStore
    • removePropertyChangeListener

      public void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
      Specified by:
      removePropertyChangeListener in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, double value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, float value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, int value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, long value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, String value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setDefault

      public void setDefault(String name, boolean value)
      Specified by:
      setDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setToDefault

      public void setToDefault(String name)
      Specified by:
      setToDefault in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, double value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, float value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, int value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, long value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, String value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore
    • setValue

      public void setValue(String name, boolean value)
      Specified by:
      setValue in interface org.eclipse.jface.preference.IPreferenceStore