1 13 package org.eclipse.jdt.internal.debug.ui; 14 15 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; 16 import org.eclipse.jdt.debug.ui.IJavaDebugUIConstants; 17 import org.eclipse.jface.preference.IPreferenceStore; 18 import org.eclipse.jface.util.PropertyChangeEvent; 19 20 public class JDIDebugUIPreferenceInitializer extends AbstractPreferenceInitializer { 21 22 public JDIDebugUIPreferenceInitializer() { 23 super(); 24 } 25 26 31 public void initializeDefaultPreferences() { 32 IPreferenceStore store = JDIDebugUIPlugin.getDefault().getPreferenceStore(); 33 store.setDefault(IJDIPreferencesConstants.PREF_SUSPEND_ON_COMPILATION_ERRORS, true); 34 store.setDefault(IJDIPreferencesConstants.PREF_SUSPEND_ON_UNCAUGHT_EXCEPTIONS, true); 35 store.setDefault(IJDIPreferencesConstants.PREF_ALERT_HCR_FAILED, true); 36 store.setDefault(IJDIPreferencesConstants.PREF_ALERT_HCR_NOT_SUPPORTED, true); 37 store.setDefault(IJDIPreferencesConstants.PREF_ALERT_OBSOLETE_METHODS, true); 38 store.setDefault(IJDIPreferencesConstants.PREF_ALERT_UNABLE_TO_INSTALL_BREAKPOINT, true); 39 40 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_QUALIFIED_NAMES, false); 41 42 store.setDefault(IJDIPreferencesConstants.PREF_ACTIVE_FILTERS_LIST, "java.lang.ClassLoader"); store.setDefault(IJDIPreferencesConstants.PREF_INACTIVE_FILTERS_LIST, "com.ibm.*,com.sun.*,java.*,javax.*,jrockit.*,org.omg.*,sun.*,sunw.*"); store.setDefault(IJDIPreferencesConstants.PREF_STEP_THRU_FILTERS, true); 46 47 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_CONSTANTS, false); 48 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_STATIC_VARIALBES, false); 49 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_CHAR, false); 50 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_HEX, false); 51 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_UNSIGNED, false); 52 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_NULL_ARRAY_ENTRIES, true); 53 store.setDefault(IJDIPreferencesConstants.PREF_SHOW_DETAILS, IJDIPreferencesConstants.DETAIL_PANE); 54 55 store.setDefault(IJavaDebugUIConstants.PREF_SHOW_SYSTEM_THREADS, false); 56 store.setDefault(IJavaDebugUIConstants.PREF_SHOW_MONITOR_THREAD_INFO, false); 57 store.setDefault(IJavaDebugUIConstants.PREF_SHOW_THREAD_GROUPS, false); 58 store.setDefault(IJDIPreferencesConstants.PREF_OPEN_INSPECT_POPUP_ON_EXCEPTION, false); 59 store.setDefault(IJavaDebugUIConstants.PREF_ALLINSTANCES_MAX_COUNT, 100); 60 store.setDefault(IJavaDebugUIConstants.PREF_ALLREFERENCES_MAX_COUNT, 100); 61 } 62 63 69 public static boolean getBoolean(PropertyChangeEvent event) { 70 Object newValue = event.getNewValue(); 71 if (newValue instanceof String ) { 72 return ((IPreferenceStore)event.getSource()).getBoolean(event.getProperty()); 73 } else { 74 return ((Boolean )newValue).booleanValue(); 75 } 76 } 77 } 78 | Popular Tags |