List of usage examples for org.eclipse.jface.preference IPreferenceStore setDefault
void setDefault(String name, boolean value);
From source file:eclox.ui.PreferencesInitializer.java
License:Open Source License
/** * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() *//*from w w w . ja v a2s . c o m*/ public void initializeDefaultPreferences() { IPreferenceStore preferences = Plugin.getDefault().getPreferenceStore(); preferences.setDefault(IPreferences.BUILD_HISTORY_SIZE, 5); preferences.setDefault(IPreferences.AUTO_SAVE, IPreferences.AUTO_SAVE_ASK); preferences.setDefault(IPreferences.HANDLE_ESCAPED_VALUES, true); }
From source file:edu.buffalo.cse.green.preferences.PreferenceInitializer.java
License:Open Source License
/** * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() *//*from w w w . j a v a 2s . c o m*/ public void initializeDefaultPreferences() { IPreferenceStore store = PlugIn.getDefault().getPreferenceStore(); store.setDefault(P_AUTOGEN_SUPER_CONSTR, true); store.setDefault(P_AUTOGEN_ABST_METHOD, true); store.setDefault(P_AUTOGEN_MAIN, false); store.setDefault(P_AUTOSAVE, true); store.setDefault(P_FIXED_HEIGHT, "200"); store.setDefault(P_FIXED_WIDTH, "100"); store.setDefault(P_COLOR_NOTE, "233,233,255"); store.setDefault(P_COLOR_UML, "255,255,206"); store.setDefault(P_COLOR_SELECTED, "96,255,96"); store.setDefault(P_COLOR_TYPE_BORDER, "0,0,0"); store.setDefault(P_COLOR_TYPE_BORDER_HIDDENR, "255,0,0"); store.setDefault(P_COLOR_COMPARTMENT_BORDER, "128,128,128"); store.setDefault(P_COLOR_TYPE_TEXT, "0,0,0"); store.setDefault(P_COLOR_NOTE_BORDER, "255,196,0"); store.setDefault(P_COLOR_NOTE_TEXT, "0,0,0"); store.setDefault(P_COLOR_REL_ARROW_FILL, "255,255,255"); store.setDefault(P_COLOR_REL_LINE, "0,0,0"); store.setDefault(P_COLOR_REL_TEXT, "0,0,0"); store.setDefault(P_DISPLAY_ELEMENT_TOOLTIPS, false); store.setDefault(P_DISPLAY_FQN_TYPE_NAMES, true); store.setDefault(P_DISPLAY_METHOD_PARAMETERS, true); store.setDefault(P_DISPLAY_RELATIONSHIP_SUBTYPES, true); store.setDefault(P_DRAW_LINE_WIDTH, 0); store.setDefault(P_FORCE_DIA_IN_PROJECT, true); store.setDefault(P_GRID_SIZE, "1"); store.setDefault(P_JM_ADD_CU_IF_PACKAGE_IN_EDITOR, false); store.setDefault(P_MANHATTAN_ROUTING, false); store.setDefault(P_DISPLAY_INCREMENTAL_EXPLORER_DIA, true); store.setDefault(P_AUTOARRANGE, false); //FIXME Font errors //The following two errors occur when Green is being initialized without generating //an editor. (e.g. through a RefactorParticipant invocation) //1 FontData font = Display.getDefault().getSystemFont().getFontData()[0]; // store.setDefault(P_FONT, "|" + font.getName() + "|" + font.getHeight()); //Results in an Invalid Thread Access error due to preference initializing being //done in a non-UI thread. //2 FontData font = new FontRegistry().defaultFont().getFontData()[0]; // store.setDefault(P_FONT, "|" + font.getName() + "|" + font.getHeight()); //Results in null pointer error due to Display not initialized prior to creating //a new FontRegistry. //This seems to bypass the issues, rather than fixing them. store.setDefault(P_FONT, "|Tahoma|8"); }
From source file:edu.cmu.emfta.preferences.PreferenceInitializer.java
License:Open Source License
/** * Initialize defaults value for preferences of the plug-in *//*from w ww . j av a 2 s. c o m*/ public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); store.setDefault(PreferenceConstants.REPORT_TYPE, PreferenceConstants.REPORT_TYPE_SINGLEPAGE); store.setDefault(PreferenceConstants.ANALYSIS_TYPE, PreferenceConstants.ANALYSIS_TYPE_QUALITATIVE); }
From source file:edu.cmu.sei.eraces.aadl.PreferenceInitializer.java
License:Open Source License
/** * Initialize defaults value for preferences of the plug-in *///from ww w. ja v a 2 s. c o m public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); store.setDefault(PreferenceConstants.ERACES_PREF_GLOBVAR, true); store.setDefault(PreferenceConstants.ERACES_PREF_SUBPROGRAMS, true); }
From source file:edu.depaul.cdm.madl.tools.ui.PreferenceConstants.java
License:Open Source License
/** * Initializes the given preference store with the default values. * /*from ww w .j a v a 2s. c om*/ * @param store the preference store to be initialized */ @SuppressWarnings("deprecation") public static void initializeDefaultValues(IPreferenceStore store) { ColorRegistry registry = getColorRegistry(); store.setDefault(PreferenceConstants.EDITOR_SHOW_SEGMENTS, false); // JavaBasePreferencePage store.setDefault(PreferenceConstants.DOUBLE_CLICK, PreferenceConstants.DOUBLE_CLICK_EXPANDS); store.setDefault(PreferenceConstants.UPDATE_JAVA_VIEWS, PreferenceConstants.UPDATE_WHILE_EDITING); store.setToDefault(PreferenceConstants.UPDATE_JAVA_VIEWS); // clear // preference, // update on save // not supported // anymore store.setDefault(PreferenceConstants.LINK_BROWSING_PROJECTS_TO_EDITOR, true); store.setDefault(PreferenceConstants.LINK_BROWSING_PACKAGES_TO_EDITOR, true); store.setDefault(PreferenceConstants.LINK_BROWSING_TYPES_TO_EDITOR, true); store.setDefault(PreferenceConstants.LINK_BROWSING_MEMBERS_TO_EDITOR, true); store.setDefault(PreferenceConstants.SEARCH_USE_REDUCED_MENU, true); // AppearancePreferencePage store.setDefault(PreferenceConstants.APPEARANCE_COMPRESS_PACKAGE_NAMES, false); store.setDefault(PreferenceConstants.APPEARANCE_METHOD_RETURNTYPE, false); store.setDefault(PreferenceConstants.APPEARANCE_METHOD_TYPEPARAMETERS, true); store.setDefault(PreferenceConstants.APPEARANCE_CATEGORY, false); store.setDefault(PreferenceConstants.BROWSING_STACK_VERTICALLY, false); store.setDefault(PreferenceConstants.APPEARANCE_PKG_NAME_PATTERN_FOR_PKG_VIEW, ""); //$NON-NLS-1$ // ImportOrganizePreferencePage store.setDefault(PreferenceConstants.ORGIMPORTS_IMPORTORDER, "java;javax;org;com"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.ORGIMPORTS_ONDEMANDTHRESHOLD, 99); store.setDefault(PreferenceConstants.ORGIMPORTS_STATIC_ONDEMANDTHRESHOLD, 99); store.setDefault(PreferenceConstants.ORGIMPORTS_IGNORELOWERCASE, true); // TypeFilterPreferencePage store.setDefault(PreferenceConstants.TYPEFILTER_ENABLED, ""); //$NON-NLS-1$ store.setDefault(PreferenceConstants.TYPEFILTER_DISABLED, ""); //$NON-NLS-1$ // ClasspathVariablesPreferencePage // CodeFormatterPreferencePage // CompilerPreferencePage // no initialization needed // RefactoringPreferencePage store.setDefault(PreferenceConstants.REFACTOR_ERROR_PAGE_SEVERITY_THRESHOLD, PreferenceConstants.REFACTOR_WARNING_SEVERITY); store.setDefault(PreferenceConstants.REFACTOR_SAVE_ALL_EDITORS, false); store.setDefault(PreferenceConstants.REFACTOR_LIGHTWEIGHT, true); // TemplatePreferencePage store.setDefault(PreferenceConstants.TEMPLATES_USE_CODEFORMATTER, true); // CodeGenerationPreferencePage // compatibility code /* if (store.getBoolean(PreferenceConstants.CODEGEN_USE_GETTERSETTER_PREFIX)) { String prefix = store.getString(PreferenceConstants.CODEGEN_GETTERSETTER_PREFIX); if (prefix.length() > 0) { DartCore.getPlugin().getPluginPreferences().setValue( JavaScriptCore.CODEASSIST_FIELD_PREFIXES, prefix); store.setToDefault(PreferenceConstants.CODEGEN_USE_GETTERSETTER_PREFIX); store.setToDefault(PreferenceConstants.CODEGEN_GETTERSETTER_PREFIX); } }*/ /* if (store.getBoolean(PreferenceConstants.CODEGEN_USE_GETTERSETTER_SUFFIX)) { String suffix = store.getString(PreferenceConstants.CODEGEN_GETTERSETTER_SUFFIX); if (suffix.length() > 0) { DartCore.getPlugin().getPluginPreferences().setValue( JavaScriptCore.CODEASSIST_FIELD_SUFFIXES, suffix); store.setToDefault(PreferenceConstants.CODEGEN_USE_GETTERSETTER_SUFFIX); store.setToDefault(PreferenceConstants.CODEGEN_GETTERSETTER_SUFFIX); } }*/ store.setDefault(PreferenceConstants.CODEGEN_KEYWORD_THIS, false); store.setDefault(PreferenceConstants.CODEGEN_IS_FOR_GETTERS, true); store.setDefault(PreferenceConstants.CODEGEN_EXCEPTION_VAR_NAME, "e"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEGEN_ADD_COMMENTS, false); store.setDefault(PreferenceConstants.CODEGEN_USE_OVERRIDE_ANNOTATION, true); // MembersOrderPreferencePage store.setDefault(PreferenceConstants.APPEARANCE_MEMBER_SORT_ORDER, "T,SF,SI,SM,F,I,C,M"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.APPEARANCE_VISIBILITY_SORT_ORDER, "B,V,R,D"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER, false); // JavaEditorPreferencePage store.setDefault(PreferenceConstants.EDITOR_MATCHING_BRACKETS, true); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_MATCHING_BRACKETS_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_MATCHING_BRACKETS_COLOR, new RGB(192, 192, 192))); store.setDefault(PreferenceConstants.EDITOR_CORRECTION_INDICATION, true); store.setDefault(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, true); store.setDefault(PreferenceConstants.EDITOR_EVALUTE_TEMPORARY_PROBLEMS, true); PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_LINKED_POSITION_COLOR, new RGB(121, 121, 121)); store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH, EDITOR_DEFAULT_TAB_WIDTH); store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SPACES_FOR_TABS, true); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_MULTI_LINE_COMMENT_COLOR, new RGB(63, 127, 95))); store.setDefault(PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR, new RGB(63, 127, 95))); store.setDefault(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DART_KEYWORD_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVA_KEYWORD_COLOR, new RGB(127, 0, 85))); store.setDefault(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD, true); store.setDefault(PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC, false); PreferenceConverter.setDefault(store, PreferenceConstants.EDITOR_JAVA_ANNOTATION_COLOR, new RGB(100, 100, 100)); store.setDefault(PreferenceConstants.EDITOR_JAVA_ANNOTATION_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVA_ANNOTATION_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_STRING_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_STRING_COLOR, new RGB(42, 0, 255))); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_MULTI_LINE_STRING_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_MULTI_LINE_STRING_COLOR, new RGB(42, 0, 255))); store.setDefault(PreferenceConstants.EDITOR_STRING_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_STRING_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DART_DEFAULT_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVA_DEFAULT_COLOR, new RGB(0, 0, 0))); store.setDefault(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_JAVA_METHOD_NAME_COLOR, new RGB(0, 0, 0)); store.setDefault(PreferenceConstants.EDITOR_JAVA_METHOD_NAME_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVA_METHOD_NAME_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DART_KEYWORD_RETURN_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVA_KEYWORD_RETURN_COLOR, new RGB(127, 0, 85))); store.setDefault(PreferenceConstants.EDITOR_JAVA_KEYWORD_RETURN_BOLD, true); store.setDefault(PreferenceConstants.EDITOR_JAVA_KEYWORD_RETURN_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DART_OPERATOR_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVA_OPERATOR_COLOR, new RGB(0, 0, 0))); store.setDefault(PreferenceConstants.EDITOR_JAVA_OPERATOR_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVA_OPERATOR_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DART_BRACKET_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVA_BRACKET_COLOR, new RGB(0, 0, 0))); store.setDefault(PreferenceConstants.EDITOR_JAVA_BRACKET_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVA_BRACKET_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_TASK_TAG_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_TASK_TAG_COLOR, new RGB(127, 159, 191))); store.setDefault(PreferenceConstants.EDITOR_TASK_TAG_BOLD, true); store.setDefault(PreferenceConstants.EDITOR_TASK_TAG_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DARTDOC_KEYWORD_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVADOC_KEYWORD_COLOR, new RGB(127, 159, 191))); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_KEYWORD_BOLD, true); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_KEYWORD_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DARTDOC_TAG_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVADOC_TAG_COLOR, new RGB(127, 127, 159))); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_TAG_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DARTDOC_LINKS_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVADOC_LINKS_COLOR, new RGB(63, 63, 191))); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_LINKS_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.EDITOR_DARTDOC_DEFAULT_COLOR, findRGB(registry, IJavaThemeConstants.EDITOR_JAVADOC_DEFAULT_COLOR, new RGB(63, 95, 191))); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD, false); store.setDefault(PreferenceConstants.EDITOR_JAVADOC_DEFAULT_ITALIC, false); store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION, true); store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_DELAY, 80); // was 300 store.setDefault(PreferenceConstants.CODEASSIST_AUTOINSERT, false); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_PROPOSALS_BACKGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255))); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_PROPOSALS_FOREGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0))); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_PARAMETERS_BACKGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255))); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_PARAMETERS_FOREGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0))); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_REPLACEMENT_BACKGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_REPLACEMENT_BACKGROUND, new RGB(255, 255, 0))); setDefaultAndFireEvent(store, PreferenceConstants.CODEASSIST_REPLACEMENT_FOREGROUND, findRGB(registry, IJavaThemeConstants.CODEASSIST_REPLACEMENT_FOREGROUND, new RGB(255, 0, 0))); store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA, "."); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVADOC, "@#"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_SHOW_VISIBLE_PROPOSALS, true); store.setDefault(PreferenceConstants.CODEASSIST_CASE_SENSITIVITY, false); store.setDefault(PreferenceConstants.CODEASSIST_ADDIMPORT, false); store.setDefault(PreferenceConstants.CODEASSIST_INSERT_COMPLETION, true); store.setDefault(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES, true); store.setDefault(PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS, true); store.setDefault(PreferenceConstants.CODEASSIST_PREFIX_COMPLETION, false); // can't believe embedded null is used as a delimiter store.setDefault(PreferenceConstants.CODEASSIST_EXCLUDED_CATEGORIES, "com.google.dart.tools.ui.spellingProposalCategory\0com.google.dart.tools.ui.textProposalCategory\0"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_CATEGORY_ORDER, "com.google.dart.tools.ui.spellingProposalCategory:65545\0com.google.dart.tools.ui.javaTypeProposalCategory:65540\0com.google.dart.tools.ui.javaNoTypeProposalCategory:65539\0com.google.dart.tools.ui.textProposalCategory:65541\0com.google.dart.tools.ui.templateProposalCategory:2\0"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_LRU_HISTORY, ""); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_SORTER, "com.google.dart.tools.ui.RelevanceSorter"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.CODEASSIST_FAVORITE_STATIC_MEMBERS, ""); //$NON-NLS-1$ store.setDefault(PreferenceConstants.EDITOR_SUB_WORD_NAVIGATION, true); store.setDefault(PreferenceConstants.EDITOR_SMART_PASTE, true); store.setDefault(PreferenceConstants.EDITOR_IMPORTS_ON_PASTE, true); store.setDefault(PreferenceConstants.EDITOR_CLOSE_STRINGS, true); store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACKETS, true); store.setDefault(PreferenceConstants.EDITOR_CLOSE_BRACES, true); store.setDefault(PreferenceConstants.EDITOR_CLOSE_JAVADOCS, true); store.setDefault(PreferenceConstants.EDITOR_WRAP_STRINGS, true); store.setDefault(PreferenceConstants.EDITOR_ESCAPE_STRINGS, false); store.setDefault(PreferenceConstants.EDITOR_ADD_JAVADOC_TAGS, true); store.setDefault(PreferenceConstants.EDITOR_FORMAT_JAVADOCS, false); //store.setDefault(PreferenceConstants.EDITOR_REMOVE_TRAILING_WS, false); int sourceHoverModifier = SWT.MOD2; String sourceHoverModifierName = Action.findModifierString(sourceHoverModifier); // Shift int nlsHoverModifier = SWT.MOD1 + SWT.MOD3; String nlsHoverModifierName = Action.findModifierString(SWT.MOD1) + "+" //$NON-NLS-1$ + Action.findModifierString(SWT.MOD3); // Ctrl + Alt store.setDefault(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIERS, "com.google.dart.tools.ui.BestMatchHover;0;com.google.dart.tools.ui.JavaSourceHover;" //$NON-NLS-1$ + sourceHoverModifierName + ";com.google.dart.tools.ui.NLSStringHover;" //$NON-NLS-1$ + nlsHoverModifierName); store.setDefault(PreferenceConstants.EDITOR_TEXT_HOVER_MODIFIER_MASKS, "com.google.dart.tools.ui.BestMatchHover;0;com.google.dart.tools.ui.JavaSourceHover;" //$NON-NLS-1$ + sourceHoverModifier + ";com.google.dart.tools.ui.NLSStringHover;" + nlsHoverModifier); //$NON-NLS-1$ store.setDefault(PreferenceConstants.EDITOR_SMART_TAB, true); store.setDefault(PreferenceConstants.EDITOR_SMART_BACKSPACE, true); store.setDefault(PreferenceConstants.EDITOR_ANNOTATION_ROLL_OVER, false); store.setDefault(EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT, true); // DartX.todo(); // store.setDefault(PreferenceConstants.FORMATTER_PROFILE, // FormatterProfileManager.DEFAULT_PROFILE); // mark occurrences /* boolean disableMarks = DartCoreDebug.DISABLE_MARK_OCCURRENCES; store.setDefault(PreferenceConstants.EDITOR_MARK_OCCURRENCES, !disableMarks);*/ store.setDefault(PreferenceConstants.EDITOR_STICKY_OCCURRENCES, false); store.setDefault(PreferenceConstants.EDITOR_MARK_TYPE_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_FIELD_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_EXCEPTION_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, true); store.setDefault(PreferenceConstants.EDITOR_MARK_BREAK_CONTINUE_TARGETS, true); store.setDefault(PreferenceConstants.EDITOR_MARK_IMPLEMENTORS, true); // folding store.setDefault(PreferenceConstants.EDITOR_FOLDING_ENABLED, true); store.setDefault(PreferenceConstants.EDITOR_FOLDING_PROVIDER, "com.google.dart.tools.ui.text.defaultFoldingProvider"); //$NON-NLS-1$ store.setDefault(PreferenceConstants.EDITOR_FOLDING_JAVADOC, false); store.setDefault(PreferenceConstants.EDITOR_FOLDING_INNERTYPES, false); store.setDefault(PreferenceConstants.EDITOR_FOLDING_METHODS, false); store.setDefault(PreferenceConstants.EDITOR_FOLDING_IMPORTS, false); store.setDefault(PreferenceConstants.EDITOR_FOLDING_HEADERS, true); store.setDefault(PreferenceConstants.EDITOR_FOLDING_CLASSES, false); store.setDefault(PreferenceConstants.EDITOR_FOLDING_FUNCTIONS, false); // properties file editor setDefaultAndFireEvent(store, PreferenceConstants.PROPERTIES_FILE_COLORING_KEY, findRGB(registry, IJavaThemeConstants.PROPERTIES_FILE_COLORING_KEY, new RGB(0, 0, 0))); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_KEY_BOLD, false); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_KEY_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.PROPERTIES_FILE_COLORING_VALUE, findRGB(registry, IJavaThemeConstants.PROPERTIES_FILE_COLORING_VALUE, new RGB(42, 0, 255))); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_VALUE_BOLD, false); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_VALUE_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.PROPERTIES_FILE_COLORING_ASSIGNMENT, findRGB(registry, IJavaThemeConstants.PROPERTIES_FILE_COLORING_ASSIGNMENT, new RGB(0, 0, 0))); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_ASSIGNMENT_BOLD, false); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_ASSIGNMENT_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.PROPERTIES_FILE_COLORING_ARGUMENT, findRGB(registry, IJavaThemeConstants.PROPERTIES_FILE_COLORING_ARGUMENT, new RGB(127, 0, 85))); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_ARGUMENT_BOLD, true); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_ARGUMENT_ITALIC, false); setDefaultAndFireEvent(store, PreferenceConstants.PROPERTIES_FILE_COLORING_COMMENT, findRGB(registry, IJavaThemeConstants.PROPERTIES_FILE_COLORING_COMMENT, new RGB(63, 127, 95))); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_COMMENT_BOLD, false); store.setDefault(PreferenceConstants.PROPERTIES_FILE_COLORING_COMMENT_ITALIC, false); store.setDefault(PreferenceConstants.PREF_DEFAULT_EXPAND_WITH_CONSTRUCTORS_MEMBERS, ""); //$NON-NLS-1$ // semantic highlighting // SemanticHighlightings.initDefaults(store); // do more complicated stuff // DartX.todo(); // NewJavaProjectPreferencePage.initDefaults(store); // reset preferences that are not settable by editor any longer // see AbstractDecoratedTextEditorPreferenceConstants store.setToDefault(EDITOR_SMART_HOME_END); // global store.setToDefault(EDITOR_LINE_NUMBER_RULER); // global store.setToDefault(EDITOR_LINE_NUMBER_RULER_COLOR); // global store.setToDefault(EDITOR_OVERVIEW_RULER); // removed -> true store.setToDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_USE_CUSTOM_CARETS); // accessibility store.setToDefault(PreferenceConstants.EDITOR_CURRENT_LINE); // global store.setToDefault(PreferenceConstants.EDITOR_CURRENT_LINE_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_PRINT_MARGIN); // global store.setToDefault(PreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN); // global store.setToDefault(PreferenceConstants.EDITOR_PRINT_MARGIN_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_FOREGROUND_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_FOREGROUND_DEFAULT_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_BACKGROUND_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_FIND_SCOPE_COLOR); // global store.setToDefault( AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SELECTION_FOREGROUND_DEFAULT_COLOR); // global store.setToDefault( AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SELECTION_BACKGROUND_DEFAULT_COLOR); // global store.setToDefault(PreferenceConstants.EDITOR_DISABLE_OVERWRITE_MODE); // global store.setToDefault(PreferenceConstants.EDITOR_SEMANTIC_HIGHLIGHTING_ENABLED); // removed store.setToDefault(PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE); // global // Code Clean Up //DartX.todo(); }
From source file:edu.duke.cs.ambient.submit.ui.preferences.SubmitPreferencePage.java
License:Open Source License
/** * Sets the default values of the preferences. *//*from w ww . j a va 2 s.c o m*/ private void initializeDefaults() { IPreferenceStore store = getPreferenceStore(); store.setDefault(AmbientGlobals.P_PORT, 31415); store.setDefault(AmbientGlobals.P_HOST, "submit.cs.duke.edu"); }
From source file:edu.iastate.varis.ui.highlighters.PreferenceConstants.java
License:Open Source License
/** * Initializes the given preference store with the default values. *///from w w w . j a va 2 s . c o m public static void initializeDefaultValues() { // Override Editor Preference defaults: IPreferenceStore editorStore = EditorsPlugin.getDefault().getPreferenceStore(); // Show current line: editorStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE, true); // Show line numbers: editorStore.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER, true); // disabling the spelling detection till we find a way to refine it the // run only on strings and comments. editorStore.setDefault(SpellingService.PREFERENCE_SPELLING_ENABLED, false); IPreferenceStore store = getPreferenceStore(); store.setDefault(JavaScriptSupportEnable, false); store.setDefault(LINK_FOLDERS_TO_EDITOR, false); store.setDefault(LINK_BROWSING_PROJECTS_TO_EDITOR, true); store.setDefault(LINK_BROWSING_FOLDERS_TO_EDITOR, true); store.setDefault(LINK_EXPLORER_TO_EDITOR, true); store.setDefault(SHOW_PHP_CHILDREN, true); store.setDefault(SHOW_CU_CHILDREN, true); store.setDefault(APPEARANCE_METHOD_RETURNTYPE, false); store.setDefault(APPEARANCE_METHOD_TYPEPARAMETERS, true); store.setDefault(APPEARANCE_ENABLE_VISIBILITY_SORT_ORDER, false); store.setDefault(EDITOR_CLOSE_BRACKETS, true); store.setDefault(EDITOR_CLOSE_BRACES, true); store.setDefault(EDITOR_CLOSE_STRINGS, true); store.setDefault(EDITOR_CLOSE_PHPDOCS_AND_COMMENTS, true); store.setDefault(EDITOR_ADD_PHPDOC_TAGS, true); store.setDefault(EDITOR_ADD_PHPCLOSE_TAGS, true); store.setDefault(EDITOR_ADD_PHP_FOR_PHPSTART_TAGS, true); store.setDefault(EDITOR_SMART_PASTE, true); // mark occurrences store.setDefault(PreferenceConstants.EDITOR_MARK_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_STICKY_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_TYPE_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_METHOD_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_CONSTANT_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_FUNCTION_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_LOCAL_VARIABLE_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_GLOBAL_VARIABLE_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_EXCEPTION_OCCURRENCES, true); store.setDefault(PreferenceConstants.EDITOR_MARK_METHOD_EXIT_POINTS, true); store.setDefault(PreferenceConstants.EDITOR_MARK_BREAK_CONTINUE_TARGETS, true); store.setDefault(PreferenceConstants.EDITOR_MARK_IMPLEMENTORS, true); store.setDefault(FORMATTER_COMMENT_CLEARBLANKLINES, false); store.setDefault(FORMATTER_COMMENT_FORMATHTML, true); store.setDefault(FORMATTER_COMMENT_LINELENGTH, 80); // RefactoringPreferencePage store.setDefault(REFACTOR_SAVE_ALL_EDITORS, false); // TemplatePreferencePage store.setDefault(TEMPLATES_USE_CODEFORMATTER, true); // MembersOrderPreferencePage store.setDefault(APPEARANCE_MEMBER_SORT_ORDER, "I,S,T,C,SV,SF,V,F"); //$NON-NLS-1$ store.setDefault(EDITOR_CORRECTION_INDICATION, true); //store.setDefault( // org.eclipse.dltk.ui.PreferenceConstants.EDITOR_CORRECTION_INDICATION, // true); store.setDefault(EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, true); store.setDefault(EDITOR_ANNOTATION_ROLL_OVER, false); // CodeAssistPreferencePage PreferenceConverter.setDefault(store, CODEASSIST_PROPOSALS_BACKGROUND, new RGB(255, 255, 255)); PreferenceConverter.setDefault(store, CODEASSIST_PROPOSALS_FOREGROUND, new RGB(0, 0, 0)); PreferenceConverter.setDefault(store, CODEASSIST_PARAMETERS_BACKGROUND, new RGB(255, 255, 255)); PreferenceConverter.setDefault(store, CODEASSIST_PARAMETERS_FOREGROUND, new RGB(0, 0, 0)); PreferenceConverter.setDefault(store, CODEASSIST_REPLACEMENT_BACKGROUND, new RGB(255, 255, 0)); PreferenceConverter.setDefault(store, CODEASSIST_REPLACEMENT_FOREGROUND, new RGB(255, 0, 0)); // SyntaxColoringPage store.setDefault(EDITOR_NORMAL_COLOR, EDITOR_NORMAL_DEFAULT_COLOR); store.setDefault(EDITOR_BOUNDARYMARKER_COLOR, EDITOR_BOUNDARYMARKER_DEFAULT_COLOR); store.setDefault(EDITOR_KEYWORD_COLOR, EDITOR_KEYWORD_DEFAULT_COLOR); store.setDefault(EDITOR_VARIABLE_COLOR, EDITOR_VARIABLE_DEFAULT_COLOR); store.setDefault(EDITOR_STRING_COLOR, EDITOR_STRING_DEFAULT_COLOR); store.setDefault(EDITOR_NUMBER_COLOR, EDITOR_NUMBER_DEFAULT_COLOR); store.setDefault(EDITOR_HEREDOC_COLOR, EDITOR_HEREDOC_DEFAULT_COLOR); store.setDefault(EDITOR_COMMENT_COLOR, EDITOR_COMMENT_DEFAULT_COLOR); store.setDefault(EDITOR_LINE_COMMENT_COLOR, EDITOR_LINE_COMMENT_DEFAULT_COLOR); store.setDefault(EDITOR_PHPDOC_COMMENT_COLOR, EDITOR_PHPDOC_COMMENT_DEFAULT_COLOR); store.setDefault(EDITOR_PHPDOC_COLOR, EDITOR_PHPDOC_DEFAULT_COLOR); store.setDefault(EDITOR_TASK_COLOR, EDITOR_TASK_DEFAULT_COLOR); // SyntaxColoringPage enable store.setDefault(getEnabledPreferenceKey(EDITOR_NORMAL_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_BOUNDARYMARKER_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_KEYWORD_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_VARIABLE_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_STRING_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_NUMBER_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_HEREDOC_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_COMMENT_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_LINE_COMMENT_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_PHPDOC_COMMENT_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_PHPDOC_COLOR), true); store.setDefault(getEnabledPreferenceKey(EDITOR_TASK_COLOR), true); // PHP options store.setDefault(PHPCoreConstants.PHP_OPTIONS_PHP_VERSION, PHPVersion.PHP5_3.toString()); store.setDefault(PHPCoreConstants.PHP_OPTIONS_PHP_ROOT_CONTEXT, ""); //$NON-NLS-1$ // Smart home/end store.setDefault(USE_SMART_HOME_END, true); // smart php code sub-word navigation store.setDefault(USE_SUB_WORD_NAVIGATION, true); // Folding options store.setDefault(EDITOR_FOLDING_ENABLED, true); store.setDefault(EDITOR_FOLDING_PROVIDER, "org.eclipse.php.ui.defaultFoldingProvider"); //$NON-NLS-1$ store.setDefault(EDITOR_FOLDING_PHPDOC, false); store.setDefault(EDITOR_FOLDING_CLASSES, false); store.setDefault(EDITOR_FOLDING_FUNCTIONS, false); // store.setDefault(EDITOR_FOLDING_INCLUDES, false); store.setDefault(TYPING_AUTO_CLOSE_STRING, true); store.setDefault(TYPING_AUTO_CLOSE_BRACKETS, true); store.setDefault(TYPING_AUTO_CLOSE_BRACES, true); store.setDefault(NEW_PHP_FILE_TEMPLATE, "New simple PHP file"); //$NON-NLS-1$ store.setDefault(ALLOW_MULTIPLE_LAUNCHES, MessageDialogWithToggle.PROMPT); String mod1Name = Action.findModifierString(SWT.MOD1); // SWT.COMMAND on // Mac; // SWT.CONTROL // elsewhere store.setDefault(EDITOR_TEXT_HOVER_MODIFIERS, "org.eclipse.php.ui.editor.hover.BestMatchHover;0;org.eclipse.php.ui.editor.hover.PHPSourceTextHover;" //$NON-NLS-1$ + mod1Name); store.setDefault(EDITOR_TEXT_HOVER_MODIFIER_MASKS, "org.eclipse.php.ui.editor.hover.BestMatchHover;0;org.eclipse.php.ui.editor.hover.PHPSourceTextHover;" //$NON-NLS-1$ + SWT.MOD1); /*store.setDefault(PHP_MANUAL_SITE, PHPManualConfigSerializer .toString(new PHPManualConfig( PHPManualSiteDescriptor.DEFAULT_PHP_MANUAL_LABEL, PHPManualSiteDescriptor.DEFAULT_PHP_MANUAL_SITE, PHPManualSiteDescriptor.DEFAULT_PHP_MANUAL_EXTENSION, false)));*/ store.setDefault(PHP_MANUAL_OPEN_IN_NEW_BROWSER, true); store.setDefault(PreferenceConstants.SEARCH_USE_REDUCED_MENU, true); store.setDefault(SWITCH_BACK_TO_PHP_PERSPECTIVE, MessageDialogWithToggle.NEVER); // default locale if (store.getString(PHPCoreConstants.WORKSPACE_DEFAULT_LOCALE).equals("")) { //$NON-NLS-1$ store.setValue(PHPCoreConstants.WORKSPACE_DEFAULT_LOCALE, Locale.getDefault().toString()); store.setDefault(PHPCoreConstants.WORKSPACE_LOCALE, Locale.getDefault().toString()); } // save actions store.setDefault(FORMAT_REMOVE_TRAILING_WHITESPACES, false); store.setDefault(FORMAT_REMOVE_TRAILING_WHITESPACES_ALL, true); store.setDefault(FORMAT_REMOVE_TRAILING_WHITESPACES_IGNORE_EMPTY, false); // default php outline mode store.setDefault(PREF_OUTLINEMODE, PHPContentOutlineConfiguration.MODE_PHP); store.setDefault(EXPLORER_GROUP_BY_NAMESPACES, false); // PHP Semantic Highlighting SemanticHighlightingManager.getInstance().initDefaults(store); // do more complicated stuff //PHPProjectLayoutPreferencePage.initDefaults(store); }
From source file:edu.rice.cs.drjava.plugins.eclipse.EclipsePlugin.java
License:BSD License
/** * Sets default preference values. These values will be used * until some preferences are actually set using Preference dialog. *//* w w w . j a v a 2s. c om*/ protected void initializeDefaultPreferences(IPreferenceStore store) { // These settings will show up when Preference dialog // opens up for the first time. store.setDefault(DrJavaConstants.INTERACTIONS_RESET_PROMPT, true); store.setDefault(DrJavaConstants.ALLOW_PRIVATE_ACCESS, false); store.setDefault(DrJavaConstants.INTERACTIONS_EXIT_PROMPT, true); store.setDefault(DrJavaConstants.HISTORY_MAX_SIZE, 500); store.setDefault(DrJavaConstants.JVM_ARGS, ""); }
From source file:edu.uchicago.cs.hao.texdojo.bibeditor.preferences.PreferenceInitializer.java
License:Open Source License
public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); store.setDefault(PreferenceConstants.P_PRESERVE_CASE, false); }
From source file:edu.uchicago.cs.hao.texdojo.latexeditor.preferences.PreferenceInitializer.java
License:Open Source License
public void initializeDefaultPreferences() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); store.setDefault(P_LATEX_EXE, DEFAULT_LATEX_EXE); store.setDefault(P_LATEX_EXE_OPT, DEFAULT_LATEX_EXE_OPT); store.setDefault(P_BIBTEX_EXE, DEFAULT_BIB_EXE); store.setDefault(P_TEMP_FILE, DEFAULT_TEMP_FILE); store.setDefault(P_COMPILE_DOC, DEFAULT_COMPILE_DOCUMENT); store.setDefault(P_MAIN_TEX, DEFAULT_MAIN_TEX); store.setDefault(P_COLOR_COMMAND, DEFAULT_COLOR_COMMAND); store.setDefault(P_COLOR_COMMENT, DEFAULT_COLOR_COMMENT); store.setDefault(P_COLOR_OPTION, DEFAULT_COLOR_OPTION); store.setDefault(P_COLOR_ARG, DEFAULT_COLOR_ARG); store.setDefault(P_COLOR_TEXT, DEFAULT_COLOR_TEXT); store.setDefault(P_COLOR_MATHMODE, DEFAULT_COLOR_MATHMODE); store.setDefault(P_LINE_WRAP, -1);/*from w w w . ja v a 2 s .c o m*/ store.setDefault(P_LINE_ALIGN, true); store.setDefault(P_SPELLCHECKER, DEFAULT_SPELLCHECKER); store.setDefault(P_SPELLCHECKER_EXE, DEFAULT_SPELLCHECKER_EXE); store.setDefault(P_SPELLCHECKER_OPTION, DEFAULT_SPELLCHECKER_OPT); }