Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Restoring Default Preferences for all preferences
Restoring Default Preferences for all preferences [message #1269924] Wed, 12 March 2014 10:17 Go to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010

I'm wondering how to programmatically restore the default settings for all the preferences available in a product. I'm a bit confused with scopes and stores Sad

I tried this:

  public static void restoreAllPreferencesToDefault() throws BackingStoreException {
    IEclipsePreferences rootNode = PreferencesService.getDefault().getRootNode();

  private static void clearAll(Preferences node) throws BackingStoreException {
    String[] names = node.childrenNames();
    for (String name : names) {

But I'm not sure it solves the problem correctly ??
Re: Restoring Default Preferences for all preferences [message #1289312 is a reply to message #1269924] Wed, 09 April 2014 07:57 Go to previous message
Hussein MHANNA is currently offline Hussein MHANNAFriend
Messages: 45
Registered: February 2014
Location: LAVAL

You can restore the default value of a preferences by using : PlatformUI.getPreferenceStore().setToDefault(YOUR_PREFERENCE_NAME);


Previous Topic:No 'Project Explorer' entry in 'Show in' menu
Next Topic:"Program received signal SIGSEGV, Segmentation fault" all over in Luna under Ubuntu 13.10
Goto Forum:

Current Time: Fri Jun 22 01:49:42 GMT 2018

Powered by FUDForum. Page generated in 0.01764 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top