Class PreferencesHelper

java.lang.Object
org.eclipse.ease.ui.scripts.preferences.PreferencesHelper

public final class PreferencesHelper
extends Object
Helper methods to access script storage preferences.
  • Method Details

    • getScriptStorageLocation

      public static String getScriptStorageLocation()
      Get the default location to store recorded/imported scripts to. If no path was defined by the user, a default path within the .metadata workspace folder is returned. As the user might change the default path also invalid entries might be returned.
      Returns:
      path to default script storage location
    • getUserScriptStorageLocation

      public static String getUserScriptStorageLocation()
      Get the storage location for recorded/imported scripts as set by the user. If the user did not explicitly set a location, null is returned.
      Returns:
      user provided storage location or null
    • getDefaultScriptStorageLocation

      public static String getDefaultScriptStorageLocation()
      Get the default location to store recorded/imported scripts to. Returns the hard-coded default location within the workspace/.metadata folder.
      Returns:
      path to default script storage location
    • getLocations

      public static Collection<IScriptLocation> getLocations()
      Returns a collection of script locations as stored in the preferences. Converts preference data to IScriptLocation elements.
      Returns:
      all configured script locations
    • getLocationForNode

      public static IScriptLocation getLocationForNode​(org.osgi.service.prefs.Preferences node)
      Create a location for a given preferences node. Reads preferences data to recreate the node.
      Parameters:
      node - preferences node to read
      Returns:
      script location
    • addLocation

      public static void addLocation​(IScriptLocation entry)
      Add a script storage location to the preferences.
      Parameters:
      entry - location to add
    • removeLocation

      public static void removeLocation​(String locationURI)
      Remove a script storage location from preferences.
      Parameters:
      locationURI - location of storage