1 /*******************************************************************************
2 * Copyright (C) 2008, Roger C. Soares <rogersoares@intelinet.com.br>
3 * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * See LICENSE for the full license text, also available.
8 *******************************************************************************/
9 package org
.spearce
.egit
.ui
;
11 import org
.eclipse
.core
.runtime
.Preferences
;
12 import org
.eclipse
.core
.runtime
.preferences
.AbstractPreferenceInitializer
;
15 * Plugin extension point to initialize the plugin runtime preferences.
17 public class PluginPreferenceInitializer
extends AbstractPreferenceInitializer
{
20 * Calls super constructor.
22 public PluginPreferenceInitializer() {
27 * This method initializes the plugin preferences with default values.
29 public void initializeDefaultPreferences() {
30 Preferences prefs
= Activator
.getDefault().getPluginPreferences();
33 prefs
.setDefault(UIPreferences
.RESOURCEHISTORY_SHOW_COMMENT_WRAP
, true);
34 prefs
.setDefault(UIPreferences
.RESOURCEHISTORY_SHOW_REV_DETAIL
, true);
35 prefs
.setDefault(UIPreferences
.RESOURCEHISTORY_SHOW_REV_COMMENT
, true);
36 prefs
.setDefault(UIPreferences
.RESOURCEHISTORY_SHOW_TOOLTIPS
, false);
38 prefs
.setDefault(UIPreferences
.DECORATOR_CALCULATE_DIRTY
, true);
39 prefs
.setDefault(UIPreferences
.DECORATOR_FILETEXT_DECORATION
,
40 UIText
.DecoratorPreferencesPage_fileFormatDefault
);
41 prefs
.setDefault(UIPreferences
.DECORATOR_FOLDERTEXT_DECORATION
,
42 UIText
.DecoratorPreferencesPage_folderFormatDefault
);
43 prefs
.setDefault(UIPreferences
.DECORATOR_PROJECTTEXT_DECORATION
,
44 UIText
.DecoratorPreferencesPage_projectFormatDefault
);
45 prefs
.setDefault(UIPreferences
.DECORATOR_SHOW_TRACKED_ICON
, true);
46 prefs
.setDefault(UIPreferences
.DECORATOR_SHOW_UNTRACKED_ICON
, true);
48 w
= new int[] { 500, 500 };
49 UIPreferences
.setDefault(prefs
,
50 UIPreferences
.RESOURCEHISTORY_GRAPH_SPLIT
, w
);
51 w
= new int[] { 700, 300 };
52 UIPreferences
.setDefault(prefs
,
53 UIPreferences
.RESOURCEHISTORY_REV_SPLIT
, w
);
55 prefs
.setDefault(UIPreferences
.FINDTOOLBAR_IGNORE_CASE
, true);
56 prefs
.setDefault(UIPreferences
.FINDTOOLBAR_FIND_IN
, 2);