Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a9025571751eb67d45ae99ada1db5de328b66a74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.team.internal.ccvs.ui;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.help.WorkbenchHelp;

/**
 * Preference page for configuring CVS comparisons
 */
public class ComparePreferencePage extends CVSFieldEditorPreferencePage {

    /* (non-Javadoc)
     * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageHelpContextId()
     */
    protected String getPageHelpContextId() {
        return IHelpContextIds.COMPARE_PREFERENCE_PAGE;
    }

    /* (non-Javadoc)
     * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#getPageDescription()
     */
    protected String getPageDescription() {
        return Policy.bind("ComparePreferencePage.0"); //$NON-NLS-1$
    }

    /* (non-Javadoc)
     * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
     */
    protected void createFieldEditors() {
		addField(new BooleanFieldEditor(
		        ICVSUIConstants.PREF_CONSIDER_CONTENTS, 
				Policy.bind("ComparePreferencePage.4"),  //$NON-NLS-1$
				BooleanFieldEditor.DEFAULT, 
				getFieldEditorParent()) {
            protected Button getChangeControl(Composite parent) {
                Button button = super.getChangeControl(parent);
                WorkbenchHelp.setHelp(button, IHelpContextIds.PREF_CONSIDER_CONTENT);
                return button;
            }
		});
		addField(new BooleanFieldEditor(
		        ICVSUIConstants.PREF_SHOW_COMPARE_REVISION_IN_DIALOG, 
		        Policy.bind("ComparePreferencePage.3"),  //$NON-NLS-1$
				BooleanFieldEditor.DEFAULT, 
				getFieldEditorParent()));
		addField(new BooleanFieldEditor(
		        ICVSUIConstants.PREF_SHOW_AUTHOR_IN_EDITOR, 
		        Policy.bind("ComparePreferencePage.1"), //$NON-NLS-1$
				BooleanFieldEditor.DEFAULT, 
				getFieldEditorParent()));
		addField(new BooleanFieldEditor(
		        ICVSUIConstants.PREF_COMMIT_SET_DEFAULT_ENABLEMENT, 
		        Policy.bind("ComparePreferencePage.2"), //$NON-NLS-1$
				BooleanFieldEditor.DEFAULT, 
				getFieldEditorParent()));
    }
    
    /* (non-Javadoc)
     * @see org.eclipse.team.internal.ccvs.ui.CVSFieldEditorPreferencePage#pushPreferences()
     */
    protected void pushPreferences() {
        super.pushPreferences();
    }
}

Back to the top