Eclipse Restore Defaults Feature
1 answer
Method of seems like a good candidate. setToDefault()
IPreferenceStore
You can see EditorsUI
using this function:
public static void useQuickDiffPreferencePage(IPreferenceStore store) {
MarkerAnnotationPreferences.useQuickDiffPreferencePage(store);
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON);
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_CHARACTER_MODE);
store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_DEFAULT_PROVIDER);
}
Or into a resetToDefaultSettings()
class methodHeapWalkingManager
:
/**
* Resets the preferences controlled by this manager to their default settings
*/
public void resetToDefaultSettings(){
JDIDebugPlugin.getDefault().getPluginPreferences().setToDefault(JDIDebugPlugin.PREF_SHOW_REFERENCES_IN_VAR_VIEW);
JDIDebugPlugin.getDefault().getPluginPreferences().setToDefault(JDIDebugPlugin.PREF_ALL_REFERENCES_MAX_COUNT);
JDIDebugPlugin.getDefault().getPluginPreferences().setToDefault(JDIDebugPlugin.PREF_ALL_INSTANCES_MAX_COUNT);
}
+3
source to share