X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/preferences/GlobalPreferences.java b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/preferences/GlobalPreferences.java new file mode 100644 index 0000000..05156eb --- /dev/null +++ b/archive/net.sourceforge.phpeclipse.quantum.sql/src/com/quantum/preferences/GlobalPreferences.java @@ -0,0 +1,49 @@ +package com.quantum.preferences; + + +import com.quantum.Messages; +import com.quantum.QuantumPlugin; + +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.IntegerFieldEditor; +import org.eclipse.jface.preference.StringFieldEditor; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +/** + * PreferencePage for the global options on QuantumDB + * @author panic + * + */ +public class GlobalPreferences +extends FieldEditorPreferencePage +implements IWorkbenchPreferencePage { + + public GlobalPreferences() { + super(FieldEditorPreferencePage.GRID); + + // Set the preference store for the preference page. + IPreferenceStore store = + QuantumPlugin.getDefault().getPreferenceStore(); + setPreferenceStore(store); + } + + public void init(IWorkbench workbench) { + this.workbench = workbench; + } + + IWorkbench workbench; + + protected void createFieldEditors() { + IntegerFieldEditor queryHistorySize = new IntegerFieldEditor( + "com.quantum.model.Bookmark.queryHistorySize", + Messages.getString(getClass().getName() + "." + + "com.quantum.model.Bookmark.queryHistorySize"), + getFieldEditorParent()); + queryHistorySize.setValidRange(0, Integer.MAX_VALUE); + this.addField(queryHistorySize); + StringFieldEditor askPasswordString = new StringFieldEditor("askPasswordString", "&Ask for password string:", getFieldEditorParent()); + this.addField(askPasswordString); + } +}