blob: 9a207a0d4212b9f8d769c87c72df4aab1e0e28e6 (
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
|
/*******************************************************************************
* Copyright (C) 2015 Andrey Loskutov <loskutov@gmx.de>
*
* 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
*******************************************************************************/
package org.eclipse.egit.ui.internal.preferences;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIPreferences;
import org.eclipse.egit.ui.internal.UIText;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
/** Preferences for committing with commit dialog/staging view. */
public class StagingViewPreferencePage extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage {
/** */
public StagingViewPreferencePage() {
super(GRID);
setTitle(UIText.StagingViewPreferencePage_title);
}
@Override
public void init(IWorkbench workbench) {
// Nothing to do
}
@Override
protected IPreferenceStore doGetPreferenceStore() {
return Activator.getDefault().getPreferenceStore();
}
@Override
protected void createFieldEditors() {
Composite main = getFieldEditorParent();
IntegerFieldEditor historySize = new IntegerFieldEditor(
UIPreferences.STAGING_VIEW_MAX_LIMIT_LIST_MODE,
UIText.StagingViewPreferencePage_maxLimitListMode, main);
addField(historySize);
}
}
|