Class PreferencesHelper
java.lang.Object
org.eclipse.ease.ui.scripts.preferences.PreferencesHelper
Helper methods to access script storage preferences.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addLocation
(IScriptLocation entry) Add a script storage location to the preferences.static String
Get the default location to store recorded/imported scripts to.static IScriptLocation
getLocationForNode
(org.osgi.service.prefs.Preferences node) Create a location for a given preferences node.static Collection<IScriptLocation>
Returns a collection of script locations as stored in the preferences.static String
Get the default location to store recorded/imported scripts to.static String
Get the storage location for recorded/imported scripts as set by the user.static void
removeLocation
(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,null
is 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 toIScriptLocation
elements.- 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
-