package net.sourceforge.phpdt.sql.preferences;
-import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
-
-import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.SWT;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
+
public class PHPSQLConnectionPreferencePage
extends PreferencePage
implements IWorkbenchPreferencePage {
StringFieldEditor fDriverFileFFE;
public PHPSQLConnectionPreferencePage() {
- super();
- setPreferenceStore(PHPEclipseSQLPlugin.getDefault().getPreferenceStore());
+ super();
+ setPreferenceStore(PHPEclipseSQLPlugin.getDefault().getPreferenceStore());
}
public void init(IWorkbench workbench) {
- setPreferenceStore(PHPEclipseSQLPlugin.getDefault().getPreferenceStore());
+ setPreferenceStore(PHPEclipseSQLPlugin.getDefault().getPreferenceStore());
}
protected void performDefaults() {
- fUserNameSFE.loadDefault();
- fConnectSFE.loadDefault();
- fDriverSFE.loadDefault();
- fTypeSFE.loadDefault();
- fDriverFileFFE.loadDefault();
- super.performDefaults();
+ fUserNameSFE.loadDefault();
+ fConnectSFE.loadDefault();
+ fDriverSFE.loadDefault();
+ fTypeSFE.loadDefault();
+ fDriverFileFFE.loadDefault();
+ super.performDefaults();
}
public boolean performOk() {
- fUserNameSFE.store();
- fConnectSFE.store();
- fDriverSFE.store();
- fTypeSFE.store();
- fDriverFileFFE.store();
- return super.performOk();
+ fUserNameSFE.store();
+ fConnectSFE.store();
+ fDriverSFE.store();
+ fTypeSFE.store();
+ fDriverFileFFE.store();
+ return super.performOk();
}
protected Control createContents(Composite parent) {
- initializeDialogUnits(parent);
- // final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
- Composite composite = new Composite(parent, SWT.LEFT);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // layout.numColumns = 1;
+ initializeDialogUnits(parent);
+ // final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ Composite composite = new Composite(parent, SWT.LEFT);
+ GridLayout layout = new GridLayout();
+ composite.setLayout(layout);
+ composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ // layout.numColumns = 1;
- fUserNameSFE =
- new StringFieldEditor(
- "phpeclipse.sql.username.connect",
- "Default User name:",
- composite);
- fUserNameSFE.setPreferencePage(this);
- fUserNameSFE.setPreferenceStore(getPreferenceStore());
- fUserNameSFE.load();
+ fUserNameSFE =
+ new StringFieldEditor(
+ "phpeclipse.sql.username.connect",
+ "Default User name:",
+ composite);
+ fUserNameSFE.setPreferencePage(this);
+ fUserNameSFE.setPreferenceStore(getPreferenceStore());
+ fUserNameSFE.load();
- fConnectSFE =
- new StringFieldEditor(
- "phpeclipse.sql.connect.connect",
- "Connect:",
- composite);
- fConnectSFE.setPreferencePage(this);
- fConnectSFE.setPreferenceStore(getPreferenceStore());
- fConnectSFE.load();
+ fConnectSFE =
+ new StringFieldEditor(
+ "phpeclipse.sql.connect.connect",
+ "Connect:",
+ composite);
+ fConnectSFE.setPreferencePage(this);
+ fConnectSFE.setPreferenceStore(getPreferenceStore());
+ fConnectSFE.load();
- fDriverSFE =
- new StringFieldEditor(
- "phpeclipse.sql.driver.connect",
- "Driver:",
- composite);
- fDriverSFE.setPreferencePage(this);
- fDriverSFE.setPreferenceStore(getPreferenceStore());
- fDriverSFE.load();
+ fDriverSFE =
+ new StringFieldEditor(
+ "phpeclipse.sql.driver.connect",
+ "Driver:",
+ composite);
+ fDriverSFE.setPreferencePage(this);
+ fDriverSFE.setPreferenceStore(getPreferenceStore());
+ fDriverSFE.load();
- fTypeSFE =
- new StringFieldEditor("phpeclipse.sql.type.connect", "Type:", composite);
- fTypeSFE.setPreferencePage(this);
- fTypeSFE.setPreferenceStore(getPreferenceStore());
- fTypeSFE.load();
+ fTypeSFE =
+ new StringFieldEditor("phpeclipse.sql.type.connect", "Type:", composite);
+ fTypeSFE.setPreferencePage(this);
+ fTypeSFE.setPreferenceStore(getPreferenceStore());
+ fTypeSFE.load();
- // fDriverFileFFE =
- // new FileFieldEditor(
- // "phpeclipse.sql.filename.connect",
- // "Driver filename:",
- // composite);
- fDriverFileFFE =
- new StringFieldEditor(
- "phpeclipse.sql.filename.connect",
- "Driver filename:",
- composite);
- fDriverFileFFE.setPreferencePage(this);
- fDriverFileFFE.setPreferenceStore(getPreferenceStore());
- fDriverFileFFE.load();
+ // fDriverFileFFE =
+ // new FileFieldEditor(
+ // "phpeclipse.sql.filename.connect",
+ // "Driver filename:",
+ // composite);
+ fDriverFileFFE =
+ new StringFieldEditor(
+ "phpeclipse.sql.filename.connect",
+ "Driver filename:",
+ composite);
+ fDriverFileFFE.setPreferencePage(this);
+ fDriverFileFFE.setPreferenceStore(getPreferenceStore());
+ fDriverFileFFE.load();
- return composite;
+ return composite;
}
}