bug 1469012, exception in CompletionProposal
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / preferences / GlobalPreferences.java
1 package com.quantum.preferences;
2
3
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;
8
9 import com.quantum.Messages;
10 import com.quantum.QuantumPlugin;
11
12 /**
13  * PreferencePage for the global options on QuantumDB
14  * @author panic
15  *
16  */
17 public class GlobalPreferences 
18 extends FieldEditorPreferencePage 
19 implements IWorkbenchPreferencePage {
20
21         public GlobalPreferences() {
22                 super(FieldEditorPreferencePage.GRID);
23                 setPreferenceStore(QuantumPlugin.getDefault().getPreferenceStore());
24         }
25
26         public void init(IWorkbench workbench) {
27         }
28
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);
37         }
38 }