package net.sourceforge.phpdt.sql.wizards;
import net.sourceforge.phpdt.sql.IConstants;
+import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
import net.sourceforge.phpdt.sql.adapters.AdapterFactory;
import net.sourceforge.phpdt.sql.adapters.DriverInfo;
import net.sourceforge.phpdt.sql.view.BookmarkView;
import net.sourceforge.phpdt.sql.view.bookmark.BookmarkNode;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
this.current = selection;
setWindowTitle("New Bookmark");
}
+
public void init() {
if (DEBUG) {
System.out.println("Initing workbench");
current = null;
setWindowTitle("New Bookmark");
}
+
public boolean performFinish() {
if (DEBUG) {
System.out.println("perform finish workbench");
mainPage.performFinish();
return true;
}
+
public void addPages() {
if (DEBUG) {
System.out.println("adding pages");
type.select(selectedIndex);
driverFile.setText(initialData.getDriverFile());
updateDriverList();
+ } else {
+
+ IPreferenceStore fStore =
+ PHPEclipseSQLPlugin.getDefault().getPreferenceStore();
+ username.setText(fStore.getString("phpeclipse.sql.username.connect"));
+ connect.setText(fStore.getString("phpeclipse.sql.connect.connect"));
+ driver.setText(fStore.getString("phpeclipse.sql.driver.connect"));
+ String typeData = fStore.getString("phpeclipse.sql.type.connect");
+ int selectedIndex = 0;
+ for (int i = 0; i < drivers.length; i++) {
+ if (typeData.equals(drivers[i].getDisplayName())) {
+ selectedIndex = i;
+ }
+ }
+ type.select(selectedIndex);
+ driverFile.setText(fStore.getString("phpeclipse.sql.filename.connect"));
+ // updateDriverList();
}
setControl(container);