1 20 21 package org.apache.directory.ldapstudio.schemas.controller; 22 23 24 import org.apache.directory.ldapstudio.schemas.Activator; 25 import org.apache.directory.ldapstudio.schemas.PluginConstants; 26 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; 27 import org.eclipse.jface.preference.IPreferenceStore; 28 29 30 public class PreferenceInitializer extends AbstractPreferenceInitializer 31 { 32 33 public PreferenceInitializer() 34 { 35 super(); 36 } 37 38 39 @Override 40 public void initializeDefaultPreferences() 41 { 42 IPreferenceStore store = Activator.getDefault().getPreferenceStore(); 43 44 store.setDefault( PluginConstants.PREFS_OPEN_FILE_DIALOG, System.getProperty( "user.home" ) ); store.setDefault( PluginConstants.PREFS_SAVE_FILE_DIALOG, System.getProperty( "user.home" ) ); 48 store.setDefault( PluginConstants.PREFS_SCHEMAS_EDITOR_SPECIFIC_CORE, false ); 50 store.setDefault( PluginConstants.PREFS_SCHEMAS_EDITOR_SPECIFIC_CORE_DIRECTORY, System 51 .getProperty( "user.home" ) ); store.setDefault( PluginConstants.PREFS_SCHEMAS_EDITOR_AUTO_OID, true ); 53 store.setDefault( PluginConstants.PREFS_SCHEMAS_EDITOR_COMPANY_OID, "1.2.3.4.5.6" ); 55 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_LABEL, 57 PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_LABEL_ALL_ALIASES ); 58 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_ABBREVIATE, true ); 59 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_ABBREVIATE_MAX_LENGTH, "50" ); store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SECONDARY_LABEL_DISPLAY, true ); 61 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SECONDARY_LABEL, 62 PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_LABEL_OID ); 63 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SECONDARY_LABEL_ABBREVIATE, false ); 64 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SECONDARY_LABEL_ABBREVIATE_MAX_LENGTH, "50" ); 66 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_GROUPING, 68 PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_GROUPING_ATFIRST ); 69 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_BY, 70 PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_BY_FIRSTNAME ); 71 store.setDefault( PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_ORDER, 72 PluginConstants.PREFS_SCHEMA_ELEMENTS_VIEW_SORTING_ORDER_ASCENDING ); 73 74 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_LABEL, 76 PluginConstants.PREFS_SCHEMAS_VIEW_LABEL_ALL_ALIASES ); 77 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_ABBREVIATE, true ); 78 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_ABBREVIATE_MAX_LENGTH, "50" ); 80 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_GROUPING, 82 PluginConstants.PREFS_SCHEMAS_VIEW_GROUPING_FOLDERS ); 83 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_SORTING_BY, 84 PluginConstants.PREFS_SCHEMAS_VIEW_SORTING_BY_FIRSTNAME ); 85 store.setDefault( PluginConstants.PREFS_SCHEMAS_VIEW_SORTING_ORDER, 86 PluginConstants.PREFS_SCHEMAS_VIEW_SORTING_ORDER_ASCENDING ); 87 88 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_LABEL, 90 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_ALL_ALIASES ); 91 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_ABBREVIATE, true ); 92 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_ABBREVIATE_MAX_LENGTH, "50" ); store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL_DISPLAY, true ); 94 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL, 95 PluginConstants.PREFS_HIERARCHY_VIEW_LABEL_OID ); 96 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL_ABBREVIATE, false ); 97 store.setDefault( PluginConstants.PREFS_HIERARCHY_VIEW_SECONDARY_LABEL_ABBREVIATE_MAX_LENGTH, "50" ); } 99 } 100 | Popular Tags |