1 package com.quantum.preferences;
4 import org.eclipse.jface.preference.FieldEditorPreferencePage;
5 import org.eclipse.jface.preference.IntegerFieldEditor;
6 import org.eclipse.ui.IWorkbench;
7 import org.eclipse.ui.IWorkbenchPreferencePage;
9 import com.quantum.Messages;
10 import com.quantum.QuantumPlugin;
13 * PreferencePage for the global options on QuantumDB
17 public class GlobalPreferences
18 extends FieldEditorPreferencePage
19 implements IWorkbenchPreferencePage {
21 public GlobalPreferences() {
22 super(FieldEditorPreferencePage.GRID);
23 setPreferenceStore(QuantumPlugin.getDefault().getPreferenceStore());
26 public void init(IWorkbench workbench) {
29 protected void createFieldEditors() {
30 IntegerFieldEditor queryHistorySize = new IntegerFieldEditor(
31 "com.quantum.model.Bookmark.queryHistorySize",
32 Messages.getString(getClass().getName() + "."
33 + "com.quantum.model.Bookmark.queryHistorySize"),
34 getFieldEditorParent());
35 queryHistorySize.setValidRange(0, Integer.MAX_VALUE);
36 this.addField(queryHistorySize);