Interface IEclipseMemory

All Known Implementing Classes:
EclipseMemory

public interface IEclipseMemory
Interface for managing interactions with Eclipse's preference storage system.

The IEclipseMemory interface defines methods for saving, loading, deleting, and clearing key-value pairs in Eclipse's preferences.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The plugin ID used to identify the preferences node in Eclipse's preference storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all key-value pairs from Eclipse's preferences storage.
    void
    Deletes the specified key-value pair from Eclipse's preferences storage.
    Loads the value associated with the specified key from Eclipse's preferences storage.
    void
    Saves a key-value pair to Eclipse's preferences storage.
  • Field Details

    • PLUGIN_ID

      static final String PLUGIN_ID
      The plugin ID used to identify the preferences node in Eclipse's preference storage.
      See Also:
  • Method Details

    • clearAll

      void clearAll()
      Clears all key-value pairs from Eclipse's preferences storage.

      This method removes all data from the preferences node associated with the plugin and flushes the changes to ensure they are persisted.

    • deleteFromEclipsePreferences

      void deleteFromEclipsePreferences(String key)
      Deletes the specified key-value pair from Eclipse's preferences storage.

      This method removes the value associated with the given key and flushes the changes to ensure they are persisted.

      Parameters:
      key - the key of the preference to remove.
    • loadFromEclipsePreferences

      String loadFromEclipsePreferences(String key)
      Loads the value associated with the specified key from Eclipse's preferences storage.
      Parameters:
      key - the key of the preference to load.
      Returns:
      the value associated with the given key, or null if the key does not exist.
    • saveOnEclipsePreferences

      void saveOnEclipsePreferences(String key, String value)
      Saves a key-value pair to Eclipse's preferences storage.

      This method associates the given key with the specified value and flushes the changes to ensure they are persisted.

      Parameters:
      key - the key of the preference to save.
      value - the value to associate with the given key.