1 package com.quantum.preferences;
4 import com.quantum.Messages;
5 import com.quantum.QuantumPlugin;
7 import org.eclipse.jface.preference.FieldEditorPreferencePage;
8 import org.eclipse.jface.preference.IPreferenceStore;
9 import org.eclipse.jface.preference.IntegerFieldEditor;
10 import org.eclipse.ui.IWorkbench;
11 import org.eclipse.ui.IWorkbenchPreferencePage;
14 * PreferencePage for the global options on QuantumDB
18 public class GlobalPreferences
19 extends FieldEditorPreferencePage
20 implements IWorkbenchPreferencePage {
22 public GlobalPreferences() {
23 super(FieldEditorPreferencePage.GRID);
25 // Set the preference store for the preference page.
26 IPreferenceStore store =
27 QuantumPlugin.getDefault().getPreferenceStore();
28 setPreferenceStore(store);
31 public void init(IWorkbench workbench) {
32 this.workbench = workbench;
37 protected void createFieldEditors() {
38 IntegerFieldEditor queryHistorySize = new IntegerFieldEditor(
39 "com.quantum.model.Bookmark.queryHistorySize",
40 Messages.getString(getClass().getName() + "."
41 + "com.quantum.model.Bookmark.queryHistorySize"),
42 getFieldEditorParent());
43 queryHistorySize.setValidRange(0, Integer.MAX_VALUE);
44 this.addField(queryHistorySize);