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 Summary
Modifier and Type Method Description static voidaddLocation(IScriptLocation entry)Add a script storage location to the preferences.static StringgetDefaultScriptStorageLocation()Get the default location to store recorded/imported scripts to.static IScriptLocationgetLocationForNode(org.osgi.service.prefs.Preferences node)Create a location for a given preferences node.static Collection<IScriptLocation>getLocations()Returns a collection of script locations as stored in the preferences.static StringgetScriptStorageLocation()Get the default location to store recorded/imported scripts to.static StringgetUserScriptStorageLocation()Get the storage location for recorded/imported scripts as set by the user.static voidremoveLocation(String locationURI)Remove a script storage location from preferences.
-
Method Details
-
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
Get the storage location for recorded/imported scripts as set by the user. If the user did not explicitly set a location,nullis returned.- Returns:
- user provided storage location or
null
-
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
Returns a collection of script locations as stored in the preferences. Converts preference data toIScriptLocationelements.- Returns:
- all configured script locations
-
getLocationForNode
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
Add a script storage location to the preferences.- Parameters:
entry- location to add
-
removeLocation
Remove a script storage location from preferences.- Parameters:
locationURI- location of storage
-