1 /*******************************************************************************
2 * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9 package org
.eclipse
.egit
.ui
.internal
.preferences
;
11 import org
.eclipse
.egit
.ui
.Activator
;
12 import org
.eclipse
.egit
.ui
.UIPreferences
;
13 import org
.eclipse
.egit
.ui
.UIText
;
14 import org
.eclipse
.jface
.preference
.BooleanFieldEditor
;
15 import org
.eclipse
.jface
.preference
.FieldEditorPreferencePage
;
16 import org
.eclipse
.ui
.IWorkbench
;
17 import org
.eclipse
.ui
.IWorkbenchPreferencePage
;
19 /** Preferences for our history view. */
20 public class HistoryPreferencePage
extends FieldEditorPreferencePage
21 implements IWorkbenchPreferencePage
{
23 public HistoryPreferencePage() {
25 setTitle(UIText
.HistoryPreferencePage_title
);
26 setPreferenceStore(Activator
.getDefault().getPreferenceStore());
30 protected void createFieldEditors() {
31 addField(new BooleanFieldEditor(
32 UIPreferences
.RESOURCEHISTORY_SHOW_COMMENT_WRAP
,
33 UIText
.ResourceHistory_toggleCommentWrap
,
34 getFieldEditorParent()));
35 addField(new BooleanFieldEditor(
36 UIPreferences
.RESOURCEHISTORY_SHOW_REV_COMMENT
,
37 UIText
.ResourceHistory_toggleRevComment
, getFieldEditorParent()));
38 addField(new BooleanFieldEditor(
39 UIPreferences
.RESOURCEHISTORY_SHOW_REV_DETAIL
,
40 UIText
.ResourceHistory_toggleRevDetail
, getFieldEditorParent()));
43 public boolean performOk() {
44 Activator
.getDefault().savePluginPreferences();
45 return super.performOk();
48 public void init(IWorkbench workbench
) {