1 11 package org.eclipse.ui.internal.ide; 12 13 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; 14 import org.eclipse.core.runtime.preferences.DefaultScope; 15 import org.eclipse.core.runtime.preferences.IEclipsePreferences; 16 import org.eclipse.ui.IWorkbenchActionConstants; 17 import org.eclipse.ui.IWorkbenchPreferenceConstants; 18 import org.eclipse.ui.ide.IDE; 19 20 24 public class IDEPreferenceInitializer extends AbstractPreferenceInitializer { 25 26 31 public void initializeDefaultPreferences() { 32 33 IEclipsePreferences node = new DefaultScope() 34 .getNode(IDEWorkbenchPlugin.getDefault().getBundle() 35 .getSymbolicName()); 36 37 39 node.put(IDE.Preferences.PROJECT_OPEN_NEW_PERSPECTIVE, 40 IWorkbenchPreferenceConstants.OPEN_PERSPECTIVE_REPLACE); 41 42 node.putBoolean(IDE.Preferences.SHOW_WORKSPACE_SELECTION_DIALOG, true); 44 45 47 node.putBoolean(IDEInternalPreferences.SAVE_ALL_BEFORE_BUILD, false); 48 node.putInt(IDEInternalPreferences.SAVE_INTERVAL, 5); node.putBoolean(IDEInternalPreferences.WELCOME_DIALOG, true); 50 node.putBoolean(IDEInternalPreferences.REFRESH_WORKSPACE_ON_STARTUP, 51 false); 52 node.putBoolean( 53 IDEInternalPreferences.EXIT_PROMPT_ON_CLOSE_LAST_WINDOW, true); 54 node.put(IDEInternalPreferences.PROJECT_SWITCH_PERSP_MODE, 55 IDEInternalPreferences.PSPM_PROMPT); 56 node.put(IDEInternalPreferences.OPEN_REQUIRED_PROJECTS, 57 IDEInternalPreferences.PSPM_PROMPT); 58 59 node.putBoolean(getHelpSeparatorKey("group.main"), true); node.putBoolean(getHelpSeparatorKey("group.assist"), true); node.putBoolean(getHelpSeparatorKey("group.updates"), true); 64 node.putBoolean(IDEInternalPreferences.LIMIT_PROBLEMS, true); 66 node.putInt(IDEInternalPreferences.PROBLEMS_LIMIT, 100); 67 68 node.putBoolean(IDEInternalPreferences.LIMIT_BOOKMARKS, true); 69 node.putInt(IDEInternalPreferences.BOOKMARKS_LIMIT, 100); 70 71 node.putBoolean(IDEInternalPreferences.LIMIT_TASKS, true); 72 node.putInt(IDEInternalPreferences.TASKS_LIMIT, 100); 73 } 74 75 private String getHelpSeparatorKey(String groupId) { 76 return "useSeparator." + IWorkbenchActionConstants.M_HELP + "." + groupId; } 78 } 79 | Popular Tags |